POST
/
metrics
/
{metric}
/
points
curl --request POST \
  --url http://localhost/api/metrics/{metric}/points \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "value": 123,
  "timestamp": "<string>"
}'
{
  "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": {
          "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": [
                {}
              ]
            }
          }
        }
      }
    }
  }
}

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
`CreateMetricPointRequestData`
value
number
required
timestamp
string | null

Response

201
application/json
`MetricPoint`
data
object
required