Rate this page:

History

Methods

GetCallHistory

Copy URL

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

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
Support
GetCallHistory example

GetCallHistory example

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.

Parameters

  • from_date:

    timestamp

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

  • to_date:

    timestamp

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

  • timezone:

    string

    Optional
    Defaults on:  Etc/GMT

    The selected timezone or the 'auto' value (the account location)

  • call_session_history_id:

    intlist

    Optional

    To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods

  • application_id:

    number

    Optional

    To receive the call history for a specific application, pass the application ID to this parameter

  • application_name:

    string

    Optional

    The application name, can be used instead of application_id

  • user_id:

    intlist

    Optional

    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_name:

    string

    Optional

    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_number:

    stringlist

    Optional

    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

  • local_number:

    stringlist

    Optional

    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_data:

    string

    Optional

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

  • with_calls:

    boolean

    Optional
    Defaults on:  false

    Whether to receive a list of sessions with all calls within the sessions, including phone numbers, call cost and other information

  • with_records:

    boolean

    Optional
    Defaults on:  false

    Whether to get the calls' records

  • with_other_resources:

    boolean

    Optional
    Defaults on:  true

    Whether to get other resources usage (see ResourceUsageType)

  • child_account_id:

    intlist

    Optional

    The child account ID list separated by semicolons (;)

  • children_calls_only:

    boolean

    Optional
    Defaults on:  false

    Whether to get the children account calls only

  • with_header:

    boolean

    Optional
    Defaults on:  true

    Whether to get a CSV file with the column names if the output=csv

  • desc_order:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the descent order

  • with_total_count:

    boolean

    Optional
    Defaults on:  true

    Whether to include the 'total_count' and increase performance

  • count:

    number

    Optional
    Defaults on:  20

    The number of returning records. In the synchronous mode, the maximum value is 1000

  • offset:

    number

    Optional
    Defaults on:  0

    The number of records to skip in the output with a maximum value of 10000

  • output:

    string

    Optional
    Defaults on:  json

    The output format. The following values available: json, csv

  • is_async:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the asynchronous mode (for csv output only). Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details

Returns

  • The CallSessionInfoType records in sync mode or 1 in async mode

  • total_count:

    number

    The total found call session count (sync mode)

  • count:

    number

    The returned call session count (sync mode)

  • timezone:

    string

    The used timezone

  • history_report_id:

    number

    The history report ID (async mode)

GetBriefCallHistory

Copy URL

Gets the account's brief call history. Use the GetHistoryReports, DownloadHistoryReport methods to download the report.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
Support
GetBriefCallHistory example

GetBriefCallHistory example

Get the brief call session history from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC.

Parameters

  • from_date:

    timestamp

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

  • to_date:

    timestamp

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

  • timezone:

    string

    Optional
    Defaults on:  Etc/GMT

    The selected timezone or the 'auto' value (the account location)

  • call_session_history_id:

    intlist

    Optional

    To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods

  • application_id:

    number

    Optional

    To receive the call history for a specific application, pass the application ID to this parameter

  • application_name:

    string

    Optional

    The application name, can be used instead of application_id

  • rule_name:

    string

    Optional

    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_number:

    stringlist

    Optional

    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

  • local_number:

    stringlist

    Optional

    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_data:

    string

    Optional

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

  • with_header:

    boolean

    Optional
    Defaults on:  true

    Whether to get a CSV file with the column names if the output=csv

  • desc_order:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the descent order

  • output:

    string

    The output format. The following values available: csv

  • is_async:

    boolean

    Whether to get records in the asynchronous mode. Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details

Returns

  • result:

    number

    In the async mode, the value is always 1

  • history_report_id:

    number

    The history report ID

GetHistoryReports

Copy URL

Gets the list of history reports and their statuses. The method returns info about reports made via GetCallHistory with the specified output=csv and is_async=true parameters. Note that the file_size field in response is valid only for video calls.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
Accountant
Support
Payer
GetHistoryReports example

GetHistoryReports example

Get all the reports.

Parameters

  • history_report_id:

    number

    Optional

    The history report ID to filter

  • history_type:

    stringlist

    Optional
    Defaults on:  calls

    The history report type list separated by semicolons (;). Use the 'all' value to select all history report types. The following values are possible: calls, calls_brief, transactions, audit, call_list

  • created_from:

    timestamp

    Optional

    The UTC creation from date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • created_to:

    timestamp

    Optional

    The UTC creation to date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • is_completed:

    boolean

    Optional

    Whether the report is completed

  • desc_order:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the descent order

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records are skipped in the output

  • application_id:

    intlist

    Optional

    The application ID to filter. Can be a list separated by semicolons (;). Use the 'all' value to select all applications

Returns

  • total_count:

    number

    The total found reports count

  • count:

    number

    The returned reports count

DownloadHistoryReport

Copy URL

Downloads the required history report.

Please note, that the history report can return in a compressed state (.gzip). In order for CURL to process a compressed file correctly, add the "--compressed" key.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Supervisor
Accountant
Payer

Parameters

  • history_report_id:

    number

    The history report ID

Returns

  • unknown:

    unknown

    See the HTTP Content-Type header instead

GetTransactionHistory

Copy URL

Gets the transaction history.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Accountant
Payer
GetTransactionHistory example

GetTransactionHistory example

Get the three transactions record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC with the 'gift' or 'money_distribution' types.

Parameters

  • from_date:

    timestamp

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

  • to_date:

    timestamp

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

  • timezone:

    string

    Optional
    Defaults on:  Etc/GMT

    The selected timezone or the 'auto' value (the account location)

  • transaction_id:

    intlist

    Optional

    The transaction ID list separated by semicolons (;)

  • transaction_type:

    stringlist

    Optional

    The transaction type list separated by semicolons (;). The following values are possible: gift_revoke, resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, rub_card_periodic_payment, rub_card_overrun_payment, rub_card_payment, robokassa_payment, gift, promo, adjustment, wire_transfer, us_wire_transfer, refund, discount, mgp_charge, mgp_startup, mgp_business, mgp_big_business, mgp_enterprise, mgp_large_enterprise, techsupport_charge, tax_charge, monthly_fee_charge, grace_credit_payment, grace_credit_provision, mau_charge, mau_overrun, im_charge, im_overrun, fmc_charge, sip_registration_charge, development_fee, money_transfer_to_child, money_transfer_to_parent, money_acceptance_from_child, money_acceptance_from_parent, phone_number_installation, phone_number_charge, toll_free_phone_number_installation, toll_free_phone_number_charge, services, user_money_transfer, paypal_payment, paypal_overrun_payment, paypal_periodic_payment

  • user_id:

    intlist

    Optional

    The user ID list separated by semicolons (;)

  • child_account_id:

    intlist

    Optional

    The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts

  • children_transactions_only:

    boolean

    Optional
    Defaults on:  false

    Whether to get the children account transactions only

  • users_transactions_only:

    boolean

    Optional
    Defaults on:  false

    Whether to get the users' transactions only

  • desc_order:

    boolean

    Optional

    Whether to get records in the descent order

  • count:

    number

    Optional
    Defaults on:  20

    The number of returning records. In the synchronous mode, the maximum value is 1000

  • offset:

    number

    Optional
    Defaults on:  0

    The number of records to skip in the output with a maximum value of 10000

  • output:

    string

    Optional
    Defaults on:  json

    The output format. The following values available: json, csv

  • is_async:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the asynchronous mode (for csv output only). Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details

  • is_uncommitted:

    boolean

    Optional
    Defaults on:  false

    Whether to get transactions on hold (transactions for which money is reserved but not yet withdrawn from the account)

Returns

  • total_count:

    number

    The total found transaction count

  • timezone:

    string

    The used timezone. 'Etc/GMT' for example

  • count:

    number

    The returned transaction count

  • history_report_id:

    number

    The history report ID (async mode)

DeleteRecord

Copy URL

Try to remove a record and transcription files.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
DeleteRecord example

DeleteRecord example

Try remove link with record_id is 1.

Parameters

Returns

  • result:

    number

GetACDHistory

Copy URL

Gets the ACD history.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
User manager
GetACDHistory example

GetACDHistory example

Get the two ACD session history records from the 2012-01-01 00:00:00 to the 2014-04-01 00:00:00.

Parameters

  • from_date:

    timestamp

    The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • to_date:

    timestamp

    The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • acd_session_history_id:

    intlist

    Optional

    The ACD session history ID list separated by semicolons (;)

  • acd_request_id:

    stringlist

    Optional

    The ACD request ID list separated by semicolons (;)

  • acd_queue_id:

    intlist

    Optional

    The ACD queue ID list to filter separated by semicolons (;)

  • user_id:

    intlist

    Optional

    The user ID list to filter separated by semicolons (;)

  • operator_hangup:

    boolean

    Optional

    Whether to get the calls terminated by the operator

  • unserviced:

    boolean

    Optional

    Whether the call is unserviced by the operator

  • min_waiting_time:

    number

    Optional

    The min waiting time filter

  • rejected:

    boolean

    Optional

    Whether the call is rejected calls by the 'max_queue_size', 'max_waiting_time' threshold

  • with_events:

    boolean

    Optional
    Defaults on:  false

    Whether to get the bound events

  • with_header:

    boolean

    Optional
    Defaults on:  true

    Whether to get a CSV file with the column names if the output=csv

  • desc_order:

    boolean

    Optional

    Whether to get records in the descent order

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records are skipped in the output

  • output:

    string

    Optional
    Defaults on:  json

    The output format. The following values available: json, csv

Returns

  • total_count:

    number

    The total found ACD session count

  • count:

    number

    The returned ACD session count

GetAuditLog

Copy URL

Gets the history of account changes.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
GetAuditLog example

GetAuditLog example

Get the three log items from the 2018-02-01 00:00:00 to the 2018-03-01 00:00:00 and filter.

Parameters

  • from_date:

    timestamp

    The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • to_date:

    timestamp

    The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss

  • timezone:

    string

    Optional
    Defaults on:  Etc/GMT

    The selected timezone or the 'auto' value (the account location)

  • audit_log_id:

    intlist

    Optional

    The audit history ID list separated by semicolons (;)

  • filtered_admin_user_id:

    string

    Optional

    The admin user ID to filter

  • filtered_ip:

    stringlist

    Optional

    The IP list separated by semicolons (;) to filter

  • filtered_cmd:

    stringlist

    Optional

    The function list separated by semicolons (;) to filter

  • advanced_filters:

    string

    Optional

    A relation ID to filter (for example: a phone_number value, a user_id value, an application_id value)

  • with_header:

    boolean

    Optional
    Defaults on:  true

    Whether to get a CSV file with the column names if the output=csv

  • desc_order:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the descent order

  • with_total_count:

    boolean

    Optional
    Defaults on:  false

    Whether to include the 'total_count' and increase performance

  • count:

    number

    Optional
    Defaults on:  100

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records are skipped in the output

  • output:

    string

    Optional
    Defaults on:  json

    The output format. The following values available: json, csv

  • is_async:

    boolean

    Optional
    Defaults on:  false

    Whether to get records in the asynchronous mode (for csv output only). If it is true, the request is available via GetHistoryReports and DownloadHistoryReport methods

Returns

  • total_count:

    number

    The total found item count

  • count:

    number

    The returned item count

  • timezone:

    string

    The used timezone

  • history_report_id:

    number

    The history report ID (async mode)