metrics/data

SAVE METRIC TIMESERIES


This API can be used to save timeseries data. To access this API, metrics:write scope is required, and MSP_CLIENT Target level and CLIENT provider permissions.

Mandatory Params

Name Type Description
CLIENT_UUID/CLIENT UNIQUE_ID String client uuid or client unique_id

PAYLOAD

  • It allows MULTIPLE JSON Objects inside the JSON Array

PAYLOAD PARAMS

Jsonkey Json Value Type Description accepted format mandatory/optional
entity JSON Object contains entity information JSON Object mandatory
type String represents type of Entity RESOURCE or CLIENT or SERVICE or INTEGRATION mandatory
uuid String entity UUID based on type UUID mandatory
labels JSON Object entity level labels based on type JSON Object optional
metrics JSON Array contains a list of metrics and its values, it have the limit 500 JSON Array mandatory
metric JSON Object contains metric information JSON mandatory
name String metric name with underscores String mandatory
labels JSON Object labels should be key and value pairs and both should be strings and labels key should starts with a letter or underscore followed by any combination of letters digits or underscores JSON Object optional
values JSON Array contains a list of JSON Array contains timestamp and values List of JSON Array mandatory
timestamp in JSON Array long time stamp in seconds long (timestamp in seconds and it must be within 1 hour from the current time) mandatory
value in JSON Array double value of the metric at the particular timestamp double mandatory

Labeling Standards

  • Labels in the API must be provided as JSON objects. They cannot be JSON arrays or strings. The following label key patterns are not allowed and will be ignored (meaning these labels will not be stored).
    • 123variable: Keys that do not start with a letter or underscore.
    • my-variable: Keys that contain a hyphen instead of an underscore.
    • #variable: Keys that include any symbol other than an underscore.
    • variable$: Keys that end with a symbol.
  • Label values must not be JSON objects or JSON arrays. If a label value is provided as a JSON object or array, it will be ignored and not stored.
  • The UUID and type keys within the labels section of an entity are not considered. Only the UUID and type provided directly within the entity object will be considered.

Path Parameters

  • clientIdstringrequired

Request Body

application/json

  • entityobject

  • metricsarray

Loading Examples...

Responses

  • successstring

Loading Examples...