Usage Meters
Activate usage meter
Changed onActivate usage meter
post/usage_meters/{usage_meter_id}/activate
Request
- Base URLhttps://api.togai.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
usage_meter_idstring required
Example:um.1zYnCiM9Bpg.1zYn
Response
Response for Create and Get usage event requests
Example response
{
"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