🖥️ API Reference
Usage
POST

POST /usage

Create a new usage event. An event could be anything from functionality within an application, such as a user clicking a button or hitting an endpoint or even infrastructure events like a deployment completing or the current memory used of a server.

For each event order and values are required keys. order represents the hierarchical order which can be used for filtering later. values is json event data. All the keys in order must exist in values.

This endpoint requires your project_api_key.

URL : https://api.trckrspace.com/usage

Method : POST

Auth required : YES

Auth headers : {'X-Api-Key': '{project_api_key}'}

Data constraints

nametypedata typedescription
orderrequiredarray[string]The hierarchical order of filter keys in the values json.
valuesrequiredjson objectThe json event object. Atleast the keys in order must exist in here.

For filter keys found in order they key and value must each have length less than or equal to 49.

Success Response

Code : 200 OK

Request examples

  • POST /usage --data '{"order": [{key}], "values": {{key}: {value}}'

Content examples

For a successful response with data:

{
    'status': 'OK',
}

Error Responses

POST usage without event or category

Code : 400 BAD_REQUEST

Notes