Overview
The Incidents API enables capturing incident data from any data source.
API methods
incidents.sync
Sync an incident with DX.
Required arguments
Name | Description |
reference_id | string - Unique identifier for the incident to support idempotent updates.
Example:
|
started_at | string - ISO-8601 timestamp when the incident started.
Example:
|
services | array of strings - Array of service names that are related to this incident. |
Optional arguments
Name | Description |
name | string - The name of the incident.
Example:
|
priority | string - Priority assigned to the incident.
Example:
|
source_url | string - URL to the incident in your incident management system.
Example:
|
resolved_at | string - ISO-8601 timestamp when the incident was resolved.
Example:
|
metadata | JSON Object - You may pass a metadata object with additional data about your deployment that you define.
{ "version": "v1.11.23" } |
β
Example
curl -X POST https://yourinstance.getdx.net/api/incidents.sync \
-H 'Accepts: application/json' \
-H 'Authorization: Bearer your_bearer_token_here' \
-H 'Content-Type: application/json' \
--data '{
"reference_id": "36b1f37a-e60f-4ccd-b0c4-878a6d1175fe",
"name": "Invalid argument broke settings page",
"priority": "p1",
"source_url": "https://app.opsgenie.com/incidents/123",
"services" : ["payments-api"],
"started_at": "2024-01-01T11:22:33",
"resolved_at": null
}'
Error codes
Error Code | Description |
| This error occurs if the API request does not include a valid API key for authentication. |
| The provided arguments are invalid. Ensure you're passing a |
| The metadata was not able to be processed. Metadata must be an object and keys may include letters, numbers, dashes and underscores. |