A lista használattal fut
GET
/api/v1/organizations/usage/runsGet paginated workflow runs with usage for the organization.
cURL példa
curl -X GET \
'https://app.intracord.hu/api/v1/organizations/usage/runs' \
-H "X-API-Key: $INTRACORD_API_KEY"Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
start_date | query | object | ISO 8601 date-time string (UTC). Lower bound (inclusive) on `created_at`. |
end_date | query | object | ISO 8601 date-time string (UTC). Upper bound (inclusive) on `created_at`. |
page | query | integer | — |
limit | query | integer | — |
filters | query | object | JSON-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 | | `callDirection` | `radio` | `{ "status": "inbound" }` | `inbound` or `outbound`; any other value matches all | | `callChannel` | `radio` | `{ "status": "telephony" }` | `telephony`, `web`, or `chat` — the group of run modes for that channel | 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. |
sort_by | query | object | Field to sort by ('duration'). Defaults to `created_at`. |
sort_order | query | string | Sort order ('asc' or 'desc'). |
authorization | header | object | — |
X-API-Key | header | object | — |
Válaszok
200Successful Responseapplication/jsonSéma megtekintése
{
"properties": {
"runs": {
"items": {
"$ref": "#/components/schemas/WorkflowRunUsageResponse"
},
"type": "array",
"title": "Runs"
},
"total_IntraCord_tokens": {
"type": "number",
"title": "Total Intracord Tokens"
},
"total_duration_seconds": {
"type": "integer",
"title": "Total Duration Seconds"
},
"total_count": {
"type": "integer",
"title": "Total Count"
},
"page": {
"type": "integer",
"title": "Page"
},
"limit": {
"type": "integer",
"title": "Limit"
},
"total_pages": {
"type": "integer",
"title": "Total Pages"
}
},
"type": "object",
"required": [
"runs",
"total_IntraCord_tokens",
"total_duration_seconds",
"total_count",
"page",
"limit",
"total_pages"
],
"title": "UsageHistoryResponse"
}404Not found422Validation Errorapplication/jsonSéma megtekintése
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}