Skip to main content

Register client usage metrics

POST /api/client/metrics

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

Request

Body

required

clientMetricsSchema

  • appName string required

    The name of the application that is evaluating toggles

  • instanceId string

    A (somewhat) unique identifier for the application

  • environment string

    Which environment the application is running in

  • bucket objectrequired

    Holds all metrics gathered over a window of time. Typically 1 hour wide

  • start objectrequired

    The start of the time window these metrics are valid for. The window is usually 1 hour wide

    oneOf
  • string date-time

    An RFC-3339-compliant timestamp.

  • stop objectrequired

    The end of the time window these metrics are valid for. The window is 1 hour wide

    oneOf
  • string date-time

    An RFC-3339-compliant timestamp.

  • toggles objectrequired

    an object containing feature names with yes/no plus variant usage

  • property name* object
  • yes number

    How many times the toggle evaluated to true

  • no integer

    How many times the toggle evaluated to false

  • variants object

    An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. { [variantName]: number }).

  • property name* integer
Responses

This response has no body.

Loading...