Skip to main content

Health Check

The health check query allows you to verify that the Reseller API is operational and responding correctly.

Query

query HealthCheck {
health {
status
timestamp
}
}

Response

{
"data": {
"health": {
"status": "ok",
"timestamp": "2025-01-15T10:30:00Z"
}
}
}

Fields

FieldTypeDescription
statusString!Status of the API. Always returns "ok" when the API is operational.
timestampString!ISO 8601 timestamp of when the health check was performed.

Example Usage

cURL

curl -X POST https://handbooks.io/api/graphql-reseller \
-H "Content-Type: application/json" \
-H "X-Api-Token: your_api_token_here" \
-d '{
"query": "query { health { status timestamp } }"
}'

JavaScript

const response = await fetch('https://handbooks.io/api/graphql-reseller', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Token': 'your_api_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 API key can be provided)
  • The response is always successful if the API is operational
  • The timestamp reflects the server time when the query was processed