How do I post a status update from a script?
Send POST /api/v1/services/{slug}/status with your Application Programming Interface (API) key and a JavaScript Object Notation (JSON) body that has a status and a message.
Before you start
- You have an API key for the service.
Example
curl -X POST https://statusraptor.com/api/v1/services/acme-cloud/status \
-H "Authorization: Bearer $STATUS_RAPTOR_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "DEGRADED", "message": "API latency is elevated."}'
A successful call returns 201 and a body with the new update's id, status and message.
Questions
Which statuses can I send?
OK, DEGRADED, CRITICAL, MONITORING, MAINTENANCE and OFFLINE, in any letter case.
How do I post for one component?
Add "componentId": "<uuid>" to the body. The component must belong to the service.
What do errors look like?
A problem document with a status code: 404 for an unknown service or component, 400 for invalid input or a key from another service. See the table in the API reference.
Are emails sent?
Yes. The update triggers the same subscriber emails as one posted in the back office.