Metrics
Update Metric
API Documentation
Components
Component Groups
Incident Updates
Incident Templates
MetricPoint
Metrics
Update Metric
PUT
/
metrics
/
{metric}
curl --request PUT \
--url http://localhost/api/metrics/{metric} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"suffix": "<string>",
"description": "<string>",
"default_value": 123,
"threshold": 30
}'
{
"data": {
"id": "<string>",
"type": "metrics",
"attributes": {
"id": "<string>",
"name": "<string>",
"suffix": "<string>",
"description": "<string>",
"default_value": "<string>",
"calc_type": "<string>",
"display_chart": "<string>",
"places": "<string>",
"default_view": "<string>",
"threshold": "<string>",
"order": "<string>",
"visible": "<string>",
"created": {
"human": "<string>",
"string": "<string>"
},
"updated": {
"human": "<string>",
"string": "<string>"
}
},
"relationships": {
"points": {
"data": [
{
"id": "<string>",
"type": "metricPoints",
"attributes": {
"id": "<string>",
"metric_id": "<string>",
"calculated_value": "<string>",
"value": "<string>",
"counter": "<string>",
"created": {
"human": "<string>",
"string": "<string>"
},
"updated": {
"human": "<string>",
"string": "<string>"
}
},
"relationships": {
"metric": {
"data": {}
}
}
}
]
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The metric ID
Body
application/json
`UpdateMetricRequestData`
Maximum length:
255
Maximum length:
255
Required range:
0 <= x <= 60
Response
200
application/json
`Metric`
Available options:
metrics
curl --request PUT \
--url http://localhost/api/metrics/{metric} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"suffix": "<string>",
"description": "<string>",
"default_value": 123,
"threshold": 30
}'
{
"data": {
"id": "<string>",
"type": "metrics",
"attributes": {
"id": "<string>",
"name": "<string>",
"suffix": "<string>",
"description": "<string>",
"default_value": "<string>",
"calc_type": "<string>",
"display_chart": "<string>",
"places": "<string>",
"default_view": "<string>",
"threshold": "<string>",
"order": "<string>",
"visible": "<string>",
"created": {
"human": "<string>",
"string": "<string>"
},
"updated": {
"human": "<string>",
"string": "<string>"
}
},
"relationships": {
"points": {
"data": [
{
"id": "<string>",
"type": "metricPoints",
"attributes": {
"id": "<string>",
"metric_id": "<string>",
"calculated_value": "<string>",
"value": "<string>",
"counter": "<string>",
"created": {
"human": "<string>",
"string": "<string>"
},
"updated": {
"human": "<string>",
"string": "<string>"
}
},
"relationships": {
"metric": {
"data": {}
}
}
}
]
}
}
}
}