Skip to main content

Send metrics in bulk

POST 

<your-unleash-url>/api/client/metrics/bulk

This operation accepts batched metrics from any client. Metrics will be inserted into Unleash's metrics storage

Request

Responses

This response has no body.

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/client/metrics/bulk' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"applications": [
{
"connectVia": [
{
"appName": "unleash-edge",
"instanceId": "edge-pod-bghzv5"
}
],
"appName": "Ingress load balancer",
"environment": "development",
"instanceId": "application-name-dacb1234",
"interval": 10,
"started": "2023-07-27T11:23:44Z",
"strategies": [
"standard",
"gradualRollout"
],
"sdkVersion": "unleash-client-java:8.0.0"
}
],
"metrics": [
{
"featureName": "my.special.feature",
"appName": "accounting",
"environment": "development",
"timestamp": "2023-07-27T11:23:44Z",
"yes": 974,
"no": 50,
"variants": {
"variantA": 15,
"variantB": 25,
"variantC": 5
}
}
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Body required
{
  "applications": [
    {
      "connectVia": [
        {
          "appName": "unleash-edge",
          "instanceId": "edge-pod-bghzv5"
        }
      ],
      "appName": "Ingress load balancer",
      "environment": "development",
      "instanceId": "application-name-dacb1234",
      "interval": 10,
      "started": "2023-07-27T11:23:44Z",
      "strategies": [
        "standard",
        "gradualRollout"
      ],
      "sdkVersion": "unleash-client-java:8.0.0"
    }
  ],
  "metrics": [
    {
      "featureName": "my.special.feature",
      "appName": "accounting",
      "environment": "development",
      "timestamp": "2023-07-27T11:23:44Z",
      "yes": 974,
      "no": 50,
      "variants": {
        "variantA": 15,
        "variantB": 25,
        "variantC": 5
      }
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!