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
header
required

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
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="

pageSize
number
Example:

10

Response

200
application/json
Response for list usage_meters request
data
object[]

Structure of usage meter

nextToken
string
context
object