For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Incident Impact Registration

Use this endpoint with the POST method to register Custom Incident Impact values.

Some teams track incidents outside of traditional Observability tools. Custom impact sources allow you to submit these values to Sleuth and get your Failure Rate and MTTR values.

Path

ENDPOINT

https://app.sleuth.io/api/1/deployments/ORG_SLUG/PROJECT_SLUG/ENVIRONMENT_SLUG/IMPACT_SOURCE_SLUG/register_impact/APIKEY

The endpoint path takes 4 slugs which direct the manual changes to the correct code project:

  • ORG_SLUG: found in the URL of your Sleuth org, immediately following https://app.sleuth.io/

  • PROJECT_SLUG: found in the URL, following the prefix https://app.sleuth.io/org_slug/

  • ENVIRONMENT_SLUG: found at the end of the URL of your Sleuth org when navigating to the target project and selecting the target custom incident impact source: env_slug=ENVIRONMENT_SLUG

  • IMPACT_SOURCE_SLUG: found in the URL of your Sleuth org when navigating to the target project and selecting the target custom incident impact source, just before the ?env_slug

The API key must also be added to the end of the path in this instance.

Parameters

Name
Type
Comments

api_key*

string

Can be found in the Organization Settings -> Details -> Api Key field in your Sleuth org.

type*

string

Valid types are triggered, resolved, and reopened.

Name
Type
Comments

id

string

The unique incident identifier from your system.

date

string

The ISO 8601 date the event occurred. Defaults to the current time.

ended_date

string

The ISO 8601 date the event ended.

Use it with "type": "triggered" to register past incident event.

title

string

The human-readable title of the incident.

url

string

URL to the incident in your external system.

Code
Comments
Response Text

200

Manual change registered successfully.

Success

400

Returned if any of the input parameters are invalid, e.g.: - date format isn't valid - value is not a valid float

The response text will indicate the nature of the error:

Bad Request - impact value must be a number

401

Returned if the API key provided doesn't exist.

Unauthorized

404

Returned if the IMPACT_ID does not exist.

MetricImpactSource Not Found

429

Returned if your requests are more frequent than one every 120 seconds. A Retry-After header is provided with the number of seconds you should wait until you try again.

You may only register a custom metric once every 120 seconds

cURL with API key in Path
curl -X POST \
'https://app.sleuth.io/api/1/deployments/<ORG_SLUG>/<PROJECT_SLUG>/<ENVIRONMENT>/<IMPACT_ID>/register_impact/<APIKEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "<TYPE>"
}'
PowerShell with API key in Path

Last updated

Was this helpful?