1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00
unleash.unleash/website/docs/reference/api/legacy/unleash/client/metrics.md
Gastón Fournier 9e76b2c40a
docs: some details spotted to align with new token types (#10523)
## About the changes
Few places where we can use Backend token instead of CLIENT.
2025-08-22 10:47:32 -03:00

874 B

id title
metrics /api/client/metrics

import SearchPriority from '@site/src/components/SearchPriority';

In order to access the client API endpoints you need to identify yourself. Unless you're using the none authentication method, you'll need to create a Backend token and add an Authorization header using the token.

Send metrics

POST: http://unleash.host.com/api/client/metrics

Register a metrics payload with a timed bucket.

{
  "appName": "appName",
  "instanceId": "instanceId",
  "bucket": {
    "start": "2016-11-03T07:16:43.572Z",
    "stop": "2016-11-03T07:16:53.572Z",
    "toggles": {
      "toggle-name-1": {
        "yes": 123,
        "no": 321
      },
      "toggle-name-2": {
        "yes": 111,
        "no": 0
      }
    }
  }
}