🖥️ API Reference
Usage
GET

GET /usage

Get usage events. This endpoint retrieves usage from your projects for a given date range. The API supports path based hierarchical filtering by any keys and values you have previously saved to trckspace.

This endpoint requires your user_api_key.

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

Method : GET

Auth required : YES

Auth headers : {'Authorization': 'Bearer {user_api_key}'}

Query Parameters

nametypedata typedescription
startDtrequiredstringDate in ISO format. E.g. 2023-12-31
endDtrequiredstringDate in ISO format. Must be less than startDt. E.g. 2024-01-01
categoryoptionalstringA category to filter the data by.
eventoptionalstringAn event to filter the data by. Requires category.

Path Parameters

nametypedata typedescription
{proxy}+optional --stringQuery keys and values to filter your search by. These are your order keys and values submitted in a post request. Each key and value has max length of 49.

Success Response

Code : 200 OK

Request examples

  • GET /usage?startDt={date1}&endDt={date2}
  • GET /usage/category?startDt={date1}&endDt={date2}
  • GET /usage/category/authentication?startDt={date1}&endDt={date2}

Content examples

For a successful response with data:

{
    'status': 'OK',
    'result': [
        {
            'dateTime': '2023-09-17T11:56:46.586306'
            'category': 'authentication',
            'event': 'user-sign-in',
            'user_uuid': '123456789',
            'location': 'London',
            '2fa': true,
        }
    ]
}

For a successful response where no data was found:

{
    'status': 'OK',
    'result': []
}

Error Responses

Get usage without startDt or endDt

Code : 400 BAD_REQUEST

Request examples

  • GET /usage?startDt={date}
  • GET /usage?endDt={date}
  • GET /usage/category

Content examples

Request with no endDt:

{
    'message': 'Missing required request parameters: [endDt]'
}

Request with no startDt:

{
    'message': 'Missing required request parameters: [startDt]'
}

Request with neither startDt or endDt:

{
    'message': 'Missing required request parameters: [startDt, endDt]'
}

Notes