v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-015406837.0 KB
Client

Register client usage metrics

Registers usage metrics. Stores information about how many times each flag was evaluated to enabled and disabled within a time frame. If provided, this operation will also store data on how many times each feature flag's variants were displayed to the end user.

post/api/client/metrics

Request body

appNamestring required

The name of the application that is evaluating toggles

instanceIdstring

A (somewhat) unique identifier for the application

sdkVersionstring

An SDK version identifier. Usually formatted as "unleash-client-<language>:<version>"

platformNamestring

The platform the application is running on. For languages that compile to binaries, this can be omitted

platformVersionstring

The version of the platform the application is running on. Languages that compile to binaries, this is expected to be the compiler version used to assemble the binary.

yggdrasilVersionstring

The semantic version of the Yggdrasil engine used by the client. If the client is using a native engine this can be omitted.

specVersionstring

The version of the Unleash client specification the client supports

sdkFlavorstring

The identifier of an integration built on top of an Unleash SDK (e.g. an OpenFeature provider). Sent so adoption of the integration can be tracked alongside sdkVersion.

sdkFlavorVersionstring

The version of the integration identified by sdk flavor, that has been built on top of an Unleash SDK

Example request

{
  "appName": "insurance-selector",
  "instanceId": "application-name-dacb1234",
  "sdkVersion": "unleash-client-java:7.0.0",
  "platformName": ".NET Core",
  "platformVersion": "3.1",
  "yggdrasilVersion": "1.0.0",
  "specVersion": "3.0.0",
  "sdkFlavor": "unleash-openfeature-node-provider",
  "sdkFlavorVersion": "1.0.1",
  "bucket": {
    "start": "2023-07-27T11:23:44Z",
    "stop": "2023-07-27T11:23:44Z",
    "toggles": {
      "myCoolToggle": {
        "yes": 25,
        "no": 42,
        "variants": {
          "blue": 6,
          "green": 15,
          "red": 46
        }
      },
      "myOtherToggle": {
        "yes": 0,
        "no": 100
      }
    }
  }
}

Response

This response has no body.