Custom Metric Impact Registration

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

You can submit custom metric impact values to Sleuth. Sleuth will perform its anomaly detection on these values and they will inform the health of your deploys. Values can represent any metric that matters to you and must be represented via a float.

Path

ENDPOINT

https://app.sleuth.io/api/1/impact/IMPACT_ID/register_impact

The endpoint path takes 1 ID which uniquely identifies the Impact Source to register a value against:

  • IMPACT_ID: must be an integer, you can find the full path (including the ID) in your Sleuth org by navigating to your Custom Metric Impact Source, clicking the gearwheel icon in the top-right corner, and selecting "Show register details"

Parameters

NameTypeComments

api_key*

string

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

value*

float

The metric value to be registered.

Examples

Make sure you replace the values surrounded by< and >with your own values.

cURL with API key in Header
curl -X POST \
'https://app.sleuth.io/api/1/impact/<IMPACT_ID>/register_impact' \
  -H 'Authorization: apikey <APIKEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": <METRIC_VALUE>
}'
cURL with API key in Body
curl -X POST \
'https://app.sleuth.io/api/1/impact/<IMPACT_ID>/register_impact' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": <METRIC_VALUE>,
  "api_key": "<APIKEY>"
}'
PowerShell with API key in Header
Invoke-RestMethod -Method POST `
-Uri 'https://app.sleuth.io/api/1/impact/<IMPACT_ID>/register_impact' `
-Headers @{
    'Authorization' = 'apikey <APIKEY>'                              
    'Content-Type' = 'application/json' 
} `
-Body '{ 
    "value": <METRIC_VALUE> 
}'
PowerShell with API key in Body
Invoke-RestMethod -Method POST `
-Uri 'https://app.sleuth.io/api/1/impact/<IMPACT_ID>/register_impact' `
-Headers @{
    'Content-Type' = 'application/json'                              
} `
-Body '{ 
    "api_key": "<APIKEY>",
    "value": <METRIC_VALUE> 
}'

Last updated