Health Check
The health check query allows you to verify that the Customer API is operational and responding correctly.
Query
query HealthCheck {
health {
status
timestamp
}
}
Response
{
"data": {
"health": {
"status": "GraphQL Public API is healthy",
"timestamp": "2025-01-15T10:30:00Z"
}
}
}
Fields
| Field | Type | Description |
|---|---|---|
status | String! | Status of the API. Returns "GraphQL Public API is healthy" when operational. |
timestamp | String! | ISO 8601 timestamp of when the health check was performed. |
Example Usage
cURL
curl -X POST https://handbooks.io/api/graphql-public \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_bearer_token_here" \
-d '{
"query": "query { health { status timestamp } }"
}'
JavaScript
const response = await fetch('https://handbooks.io/api/graphql-public', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_bearer_token_here',
},
body: JSON.stringify({
query: `
query {
health {
status
timestamp
}
}
`,
}),
});
const { data } = await response.json();
console.log(data.health);
Use Cases
- Monitoring: Use this endpoint for uptime monitoring and health checks
- Connection Testing: Verify API connectivity before making other requests
- Status Verification: Confirm the API is operational before processing requests
Notes
- This endpoint does not require authentication (though bearer token can be provided)
- The response is always successful if the API is operational
- The timestamp reflects the server time when the query was processed