Usage Meters
List usage meters for event schema
Changed onGet a list of usage meters associated with an event schema
get/usage_meters
Request
- Base URLhttps://api.togai.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
status'ACTIVE' | 'INACTIVE'
Filter by status
aggregations'COUNT' | 'SUM'
Filter by aggregations
nextTokenstring
Example:eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==
pageSizenumber
Example:10
Response
Response for list usage_meters request
Example response
{
"data": [
{
"name": "rides-usage",
"billableName": "Rides Usage",
"description": "Meter to track cab rides",
"type": "COUNTER",
"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"
}
]
}
]
}Changes
- info
added the optional property
//to the response with the status
- info
- info
added the required property
//to the response with the status
- info