mirror of https://github.com/statping/statping
Created graphql (markdown)
parent
f1f4921b49
commit
658cd59b6c
|
@ -0,0 +1,35 @@
|
||||||
|
Statping implements the [GraphQL](https://graphql.org/) API interface so you can customize the exact data you need within a query. The GraphQL endpoint is at `/graphql` on your Statping instance and is only available for Authenticated users or while sending the `Authorization` API Secret.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/hunterlong/statping/blob/master/handlers/graphql/schema.graphql">View schema.graphql</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### Example Queries
|
||||||
|
|
||||||
|
Retrieve the `id`, `name`, and `public` parameters from `service` #2.
|
||||||
|
###### GraphQL Query:
|
||||||
|
```graphql
|
||||||
|
{
|
||||||
|
service(id: 2) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
public
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
###### Response:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"service": {
|
||||||
|
"id": 2,
|
||||||
|
"name": "Statping Github",
|
||||||
|
"public": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
Loading…
Reference in New Issue