API Endpoint
GET/api/v1/global/agents/executions/list
Content-Type: application/json
Authentication: Required (API token validated by middleware apiauth.verifyToken). Provide token via header token or api_access_token.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | integer | No | Filter records for a specific agent. |
calling_number | string | No | Partial-match against CALLING_NUMBER (uses SQL LIKE). |
provider_number | string | No | Exact match against PROVIDER_NUMBER. |
status | string/integer | No | Filter by execution STATUS (or CALL_STATUS in some places). Examples: completed, failed. |
fromdate | string | No | Start date (e.g. 2025-01-01 or datetime). Defaults to 1 month back if omitted. |
todate | string | No | End date. Defaults to now if omitted. |
page | integer | No | Page number (used with limit to paginate results). |
limit | integer | No | Page size / limit. |
audio_url | string | No | Use available to return records that have an audio file (FILE_PATH present). |
transcript | string | No | Use available to return records that have TRANSCRIPT present. |
sentiment | string | No | Filter by OVERALL_SENTIMENT (if voice analysis available). |
disposition | string | No | Comma-separated dispositions; will be applied as SQL IN filter. |
emotion | string | No | Filter by DETECTED_EMOTION. |
input_data | string | No | Partial-match (LIKE) against INPUT_DATA. |
cost_breakdown | string | No | Partial-match (LIKE) against COST_BREAKDOWN or within RETURN_DATA. |
duration | string | No | Range filter (e.g., 30-300) for TOTAL_DURATION (per-call list). |
Note: The handler accepts parameters from req.query (GET). The underlying implementation also supports similar filters for POST bodies in the agent controller, but this global route is exposed as GET.
Example Requests
Get executions for an agent (GET)
Filter by calling number (partial)
Filter by audio availability and transcript
Filter by disposition and sentiment
Successful Response (200)
Returns an object withdatalist containing call execution records. Each record includes many fields; the key fields are listed below. The controller formats durations and dates (e.g., total_duration as 1h:2m:3s, date, time).
Field Notes
total_durationis formatted by the controller asXh:Ym:ZsorMm:Ssstyle for readability (the DB stores seconds).RETURN_DATAis filtered to remove some internal fields;cost_breakdownmay be moved intoRETURN_DATA.cost_breakdownif present.FILE_PATHis the URL to audio recording (if available).TRANSCRIPTmay be null or empty if speech-to-text was not produced.VOICE_QUALITY_FEEDBACKis a numeric rating stored for voice analysis (e.g., upvote/downvote).agent_nameis provided via join with agent details when available.
Pagination
- The endpoint accepts
pageandlimitto paginate results. The controller applieslimitandoffsetwhen querying. - Note: the current implementation returns only
datalist(array) and does not include pagination metadata (totalRecords,totalPages) in the response. Usepageandlimitto page through results.
Error Responses
400 Bad Request
401 Unauthorized
500 Internal Server Error
Important Notes & Recommendations
- Use narrow date ranges (≤ 3 months) for faster queries. The underlying controller defaults to 1 month if
fromdate/todateare omitted. - For more aggregate/grouped metrics use
/api/v1/global/agents/call-history(agent-level summary). - For export of conversational data (Excel), the system provides a separate endpoint (
downloadConversationalData) which streams an XLSX. - If you need pagination metadata added to the response, we can update the controller to include
totalRecordsandtotalPages.

