Ugrás a fő tartalomhoz

A lista használattal fut

GET/api/v1/organizations/usage/runs

Get paginated workflow runs with usage for the organization.

cURL példa

curl -X GET \
  'http://localhost:8000/api/v1/organizations/usage/runs' \
  -H 'Authorization: Bearer <API_KEY>'

Paraméterek

NévHelyTípusLeírás
start_datequeryobjectISO 8601 date-time string (UTC). Lower bound (inclusive) on `created_at`.
end_datequeryobjectISO 8601 date-time string (UTC). Upper bound (inclusive) on `created_at`.
pagequeryinteger
limitqueryinteger
filtersqueryobjectJSON-encoded array of filter objects. Each object has the shape: ```json { "attribute": "<name>", "type": "<type>", "value": <value> } ``` Supported `attribute` / `type` / `value` combinations: | attribute | type | value shape | matches | |-----------------|---------------|----------------------------------------------|------------------------------------------------------| | `runId` | `number` | `{ "value": 12345 }` | exact run id | | `workflowId` | `number` | `{ "value": 42 }` | exact agent (workflow) id | | `campaignId` | `number` | `{ "value": 7 }` | exact campaign id | | `callerNumber` | `text` | `{ "value": "415555" }` | substring match on `initial_context.caller_number` | | `calledNumber` | `text` | `{ "value": "9911848" }` | substring match on `initial_context.called_number` | | `dispositionCode` | `multiSelect` | `{ "codes": ["XFER", "DNC"] }` | any of the codes in `gathered_context.mapped_call_disposition` | | `duration` | `numberRange` | `{ "min": 60, "max": 300 }` | call duration (seconds), inclusive bounds | Unknown attributes and unsupported `type` values are silently ignored. Date filtering on this endpoint is done via the dedicated `start_date` / `end_date` query params, not via a `dateRange` filter object.
authorizationheaderobject
X-API-Keyheaderobject

Válaszok

200Successful Response
application/json
Séma megtekintése
{
  "$ref": "#/components/schemas/UsageHistoryResponse"
}
404Not found
422Validation Error
application/json
Séma megtekintése
{
  "$ref": "#/components/schemas/HTTPValidationError"
}