1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/docs/api/client/metrics-api.md

34 lines
748 B
Markdown
Raw Normal View History

---
id: metrics
title: /api/client/metrics
---
2017-06-28 10:17:48 +02:00
2021-05-18 12:07:07 +02:00
> 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 CLIENT token](../../user_guide/api-token) and add an Authorization header using the token.
2017-06-28 10:17:48 +02:00
### Send metrics
`POST: http://unleash.host.com/api/client/metrics`
2017-06-28 10:17:48 +02:00
2018-11-22 11:20:28 +01:00
Register a metrics payload with a timed bucket.
2017-06-28 10:17:48 +02:00
```json
{
2018-11-22 11:20:28 +01:00
"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
}
2017-12-18 14:20:45 +01:00
}
2018-11-22 11:20:28 +01:00
}
2017-06-28 10:17:48 +02:00
}
```