runtime quota usages

Returns messages usage history of the specified contract within defined period.

Returns aggregated message counts per month for all workspaces of the contract. Only a corresponding contract member or a client with global usage read permission can be authorized to access this resource. Returns aggregated message counts for the contract within the given period. By default the response is aggregated across all workspaces of the contract. When per_workspace=true is provided, the response contains per-workspace breakdown (each item includes workspaceId).

get/runtime-quota-usages/contracts/{contract_id}/messages-usage/history

Path parameters

contract_idstring required

Contract identifier

Query parameters

fromstring required

Start Date of the period (inclusive). Format – ISO 8601.

tostring required

End Date of the period (inclusive). Format – ISO 8601.

group_bystring

Param to specify aggregation period. Format - 'day', 'month' (default: 'month')

per_workspacestring

When set to true, returns usage history broken down per workspace. By default, the response is aggregated across all workspaces of the contract.

workspace_idsstring[]

Optional list of workspace IDs to limit the messages usage history to. Can be repeated for multiple IDs. Only workspaces belonging to the contract are considered.

Response

OK

Example response

{
  "data": [
    {
      "id": "2024-01-01",
      "messagesCount": 1000
    }
  ]
}