Metrics

Get metrics.

get
Authorizations
Query parameters
start-indexinteger · int32Optional

an integer specifying the starting point (beginning with 0) when paging through a list of entities

Default: 0
max-resultsinteger · int32 · max: 100Optional

the maximum number of results when paging through a list of metrics. (Note: when using ?include maximum is reduced to 25)

Default: 10
Responses
200
The metrics
application/json
get
GET /api/metrics HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

The metrics

[
  {
    "id": 1,
    "name": "text",
    "description": "text",
    "aggregationType": "AVG",
    "displayType": "GRAPH",
    "interpolateGaps": false,
    "lockYAxisMax": 1,
    "lockYAxisMin": 1,
    "mouseOverDecimal": 1,
    "showValuesOnMouseOver": false,
    "teams": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "unitLabel": "text",
    "integrationKey": "text",
    "dataSource": {
      "id": 1,
      "name": "text",
      "type": "DATADOG",
      "teams": [
        {
          "id": 1,
          "name": "text"
        }
      ]
    }
  }
]

Create a new metric.

post
Authorizations
Body
namestringRequired
descriptionstringOptional
aggregationTypestring · enumRequiredPossible values:
displayTypestring · enumRequiredPossible values:
interpolateGapsbooleanOptionalDefault: false
lockYAxisMaxnumber · doubleOptional
lockYAxisMinnumber · doubleOptional
mouseOverDecimalnumber · int32 · max: 6Optional
showValuesOnMouseOverbooleanOptionalDefault: false
unitLabelstringOptional
metadataone ofOptional

Only required if the metric has a dataSource. You may not change this after creation.

Default: null
or
Responses
200
The newly created metric
application/json
post
POST /api/metrics HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 283

{
  "name": "text",
  "description": "text",
  "aggregationType": "AVG",
  "displayType": "GRAPH",
  "interpolateGaps": false,
  "lockYAxisMax": 1,
  "lockYAxisMin": 1,
  "mouseOverDecimal": 1,
  "showValuesOnMouseOver": false,
  "teams": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "unitLabel": "text",
  "metadata": "null",
  "dataSource": {
    "id": 1
  }
}
200

The newly created metric

{
  "id": 1,
  "name": "text",
  "description": "text",
  "aggregationType": "AVG",
  "displayType": "GRAPH",
  "interpolateGaps": false,
  "lockYAxisMax": 1,
  "lockYAxisMin": 1,
  "mouseOverDecimal": 1,
  "showValuesOnMouseOver": false,
  "teams": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "unitLabel": "text",
  "integrationKey": "text",
  "metadata": "null",
  "dataSource": {
    "id": 1,
    "name": "text",
    "type": "DATADOG",
    "teams": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "metadata": {
      "region": "text",
      "apiKey": "text",
      "applicationKey": "text"
    }
  }
}

Get a specific Metric

get
Authorizations
Path parameters
idnumberRequired

entity ID

Responses
200
The requested metric
application/json
get
GET /api/metrics/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

The requested metric

{
  "id": 1,
  "name": "text",
  "description": "text",
  "aggregationType": "AVG",
  "displayType": "GRAPH",
  "interpolateGaps": false,
  "lockYAxisMax": 1,
  "lockYAxisMin": 1,
  "mouseOverDecimal": 1,
  "showValuesOnMouseOver": false,
  "teams": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "unitLabel": "text",
  "integrationKey": "text",
  "metadata": "null",
  "dataSource": {
    "id": 1,
    "name": "text",
    "type": "DATADOG",
    "teams": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "metadata": {
      "region": "text",
      "apiKey": "text",
      "applicationKey": "text"
    }
  }
}

Update the specific Metric

put
Authorizations
Path parameters
idnumberRequired

entity ID

Body
namestringRequired
descriptionstringOptional
aggregationTypestring · enumRequiredPossible values:
displayTypestring · enumRequiredPossible values:
interpolateGapsbooleanOptionalDefault: false
lockYAxisMaxnumber · doubleOptional
lockYAxisMinnumber · doubleOptional
mouseOverDecimalnumber · int32 · max: 6Optional
showValuesOnMouseOverbooleanOptionalDefault: false
unitLabelstringOptional
metadataone ofOptional

Only required if the metric has a dataSource. You may not change this after creation.

Default: null
or
Responses
200
The updated metric
application/json
put
PUT /api/metrics/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 283

{
  "name": "text",
  "description": "text",
  "aggregationType": "AVG",
  "displayType": "GRAPH",
  "interpolateGaps": false,
  "lockYAxisMax": 1,
  "lockYAxisMin": 1,
  "mouseOverDecimal": 1,
  "showValuesOnMouseOver": false,
  "teams": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "unitLabel": "text",
  "metadata": "null",
  "dataSource": {
    "id": 1
  }
}
200

The updated metric

{
  "id": 1,
  "name": "text",
  "description": "text",
  "aggregationType": "AVG",
  "displayType": "GRAPH",
  "interpolateGaps": false,
  "lockYAxisMax": 1,
  "lockYAxisMin": 1,
  "mouseOverDecimal": 1,
  "showValuesOnMouseOver": false,
  "teams": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "unitLabel": "text",
  "integrationKey": "text",
  "metadata": "null",
  "dataSource": {
    "id": 1,
    "name": "text",
    "type": "DATADOG",
    "teams": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "metadata": {
      "region": "text",
      "apiKey": "text",
      "applicationKey": "text"
    }
  }
}

Delete the specific Metric

delete
Authorizations
Path parameters
idnumberRequired

entity ID

Responses
204
Empty body delete response
delete
DELETE /api/metrics/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

Empty body delete response

No content

Was this helpful?