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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

metric
integer
required

The metric ID

Body

application/json
`UpdateMetricRequestData`
name
string
required
Maximum length: 255
suffix
string | null
Maximum length: 255
description
string | null
default_value
number | null
threshold
integer | null
Required range: 0 <= x <= 60

Response

200
application/json
`Metric`
data
object
required