GetCallHistory

View as Markdown
Gets the account's call history (including call duration, cost, logs and other call information). You can filter the call history by a certain date. Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `Support`. **Example request:** Get the first call session history record with calls and record URLs from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC.

Authentication

AuthorizationBearer
Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

Query parameters

from_datestringRequired

The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss

to_datestringRequired

The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss

call_session_history_idlist of integersOptional
To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). The maximum number of records is 1000. You can find the session ID in the <a href='/docs/references/voxengine/appevents#started'>AppEvents.Started</a> event's **sessionID** property in a scenario, or retrieve it from the **call_session_history_id** value returned from the <a href='/api-reference/management-api/scenarios/reorderscenarios'>StartScenarios</a> or <a href='/api-reference/management-api/scenarios/startconference'>StartConference</a> methods
application_idintegerOptional
To receive the call history for a specific application, pass the application ID to this parameter
application_namestringOptional

The application name, can be used instead of application_id

user_idlist of integersOptional

To receive the call history for a specific users, pass the user ID list separated by semicolons (;). If it is specified, the output contains the calls from the listed users only

rule_namestringOptional

To receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name

remote_numberlist of stringsOptional

To receive a call history for a specific remote numbers, pass the number list separated by semicolons (;). A remote number is a number on the client side. Ignored if the remote_number_list parameter is not empty

remote_number_listmap from strings to anyOptional

A JS array of strings of specific remote phone numbers to sort the call history. Has higher priority than the remote_number parameter. If the array is empty, the remote_number parameter is used instead

local_numberlist of stringsOptional

To receive a call history for a specific local numbers, pass the number list separated by semicolons (;). A local number is a number on the platform side

call_session_history_custom_datastringOptional

To filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter

with_callsbooleanOptionalDefaults to false
Whether to receive a list of sessions with all calls within the sessions, including phone numbers, call cost and other information
with_recordsbooleanOptionalDefaults to false
Whether to get the calls' records
with_other_resourcesbooleanOptionalDefaults to true

Whether to get other resources usage (see [ResourceUsageType])

child_account_idlist of integersOptional

The child account ID list separated by semicolons (;)

children_calls_onlybooleanOptionalDefaults to false
Whether to get the children account calls only
desc_orderbooleanOptionalDefaults to false
Whether to get records in the descent order
with_total_countbooleanOptionalDefaults to true

Whether to include the ‘total_count’ and increase performance

countintegerOptionalDefaults to 20
The number of returning records. The maximum value is 1000
offsetintegerOptionalDefaults to 0
The number of records to skip in the output. The maximum value of 10000

Response

Successful response
resultlist of objects
The CallSessionInfoType records
total_countinteger
The total found call session count
countinteger
The returned call session count
timezonestring
The used timezone