POST
/
v1
/
metrics
curl --request POST \
  --url https://api.trata.ai/v1/metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "requests": [
    {
      "id": "<string>",
      "name": "CALLS",
      "fromDate": "2023-12-25",
      "toDate": "2023-12-25",
      "aggregationPeriod": "MONTHLY",
      "aggregationFormula": "COUNT"
    }
  ]
}'
{
  "responses": [
    {
      "id": "<string>",
      "name": "CALLS",
      "datapoints": [
        {
          "timestamp": "2023-12-25",
          "value": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.