GET
/
usage_meters
curl --request GET \
  --url https://api.togai.com/usage_meters \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "01BX5ZZKBKACTAV9WEVG",
      "name": "Rides",
      "displayName": "Rides Usage",
      "description": "Cab rides",
      "type": "COUNTER",
      "aggregation": "COUNT",
      "status": "DRAFT",
      "computations": [
        {
          "matcher": "{\n  \"and\": [\n    {\"in\": [{\"var\": \"dimension.city\"}, \"chennai\", \"mumbai\"]},\n    \"or\": [\n      {\">\": [{\"var\": \"attribute.distance\"}, 100]},\n      {\"<\": [{\"var\": \"attribute.distance\"}, 20]}\n    ]\n  ]\n}\n",
          "order": 1,
          "computation": "1"
        }
      ]
    }
  ],
  "nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==",
  "context": {
    "pageSize": 10
  }
}

Authorizations

Authorization
string
headerrequired

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

Query Parameters

status
enum<string>

Filter by status

Available options:
ACTIVE,
INACTIVE
aggregations
enum<string>

Filter by aggregations

Available options:
COUNT,
SUM
nextToken
string
pageSize
number

Response

200 - application/json
data
object[]
nextToken
string
context
object