Custom Metrics

Update a custom metric definition

Changed on

Replaces the definition in full, so an omitted optional field is cleared. Only PUBLIC_API metrics can be updated through the API. API key must have the Configure Eng Intelligence custom metrics permission.

put/api/v1/eng-intel/custom-metrics/{customMetricKey}

Request

  • Base URL
    https://api.getcortexapp.com
  • URL
    https://api.getcortexapp.com/api/v1/eng-intel/custom-metrics/{customMetricKey}
  • Auth
    HTTP bearer

Path parameters

customMetricKeystring required

Key of the custom metric

Request body

categorystring

Free-text group for the metric

descriptionstring

What the metric measures

isDraftboolean

A draft metric still accepts data points but is hidden from Eng Intelligence. Defaults to false.

namestring required

Display name

valence'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' required

Whether a higher value is better. Defaults to NEUTRAL.

Example request

{
  "category": "Delivery",
  "name": "Deploy frequency"
}

Response

The updated custom metric definition

categorystring

Free-text group for the metric

cqlExpressionstring

The CQL expression behind a CQL metric. Null for PUBLIC_API.

descriptionstring

What the metric measures

isDraftboolean required

A draft metric is hidden from Eng Intelligence

keystring required

Unique key that data points are recorded against

namestring required

Display name

type'CQL' | 'PUBLIC_API' required

PUBLIC_API metrics take data points through the API. CQL metrics compute their values from a CQL expression and are read-only through the API.

valence'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' required

Whether a higher value is better

Example response

{
  "category": "Delivery",
  "key": "deploy-frequency",
  "name": "Deploy frequency"
}

Changes