Send metrics in bulk
POST/api/client/metrics/bulk
This operation accepts batched metrics from any client. Metrics will be inserted into Unleash's metrics storage
Request
- application/json
Body
required
bulkMetricsSchema
Array [
Array [
]
- MOD1
- MOD2
]
Array [
- MOD1
- MOD2
]
applications
object[]
required
A list of applications registered by an Unleash SDK
connectVia
object[]
A list of applications this app registration has been registered through. If connected directly to Unleash, this is an empty list. This can be used in later visualizations to tell how many levels of proxy or Edge instances our SDKs have connected through
The name of the application that is evaluating toggles
Ingress load balancer
Which environment the application is running in
development
A (somewhat) unique identifier for the application
application-name-dacb1234
How often (in seconds) the application refreshes its features
10
started
object
The application started at
oneOf
An RFC-3339-compliant timestamp.
string
integer
The version the sdk is running. Typically
unleash-client-java:8.0.0
metrics
object[]
required
a list of client usage metrics registered by downstream providers. (Typically Unleash Edge)
Name of the feature checked by the SDK
my.special.feature
The name of the application the SDK is being used in
accounting
Which environment the SDK is being used in
development
timestamp
object
The start of the time window these metrics are valid for. The window is 1 hour wide
oneOf
An RFC-3339-compliant timestamp.
string
integer
How many times the toggle evaluated to true
974
How many times the toggle evaluated to false
50
variants
object
How many times each variant was returned
Responses
- 202
- 400
- 413
- 415
This response has no body.
The request data does not match what we expect.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ValidationError
A description of what went wrong.
The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent [].
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ValidationError",
"message": "The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent []."
}
The request body is larger than what we accept. By default we only accept bodies of 100kB or less
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ContentTooLarge
A description of what went wrong.
You provided more data than we can handle. Unleash accepts at most X MB.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ContentTooLarge",
"message": "You provided more data than we can handle. Unleash accepts at most X MB."
}
The operation does not support request payloads of the provided type. Please ensure that you're using one of the listed payload types and that you have specified the right content type in the "content-type" header.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ContentTypeerror
A description of what went wrong.
We do not accept the content-type you provided (application/xml). Try using one of the content-types we do accept instead (application/json) and make sure the body is in the corresponding format.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ContentTypeerror",
"message": "We do not accept the content-type you provided (application/xml). Try using one of the content-types we do accept instead (application/json) and make sure the body is in the corresponding format."
}