ВОЙТИ

History

Methods

DeleteRecord

Try to remove record and transcription files.

Parameters

  • Follow link for authentication parameter names and details.

  • record_url:

    string
    OPTIONAL

    Url to remove.

  • record_id:

    number
    OPTIONAL

    The record id for remove.

Returns

  • result:

    number

Примеры

запрос:

Try remove link with record_id is 1.

https://api.voximplant.com/platform_api/DeleteRecord/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&record_id=1

ответ:

Try remove link with record_id is 1.

{
    "result": 1
}

DownloadHistoryReport

Downloads the required history report.

Parameters

  • Follow link for authentication parameter names and details.

  • history_report_id:

    number

    The history report ID.

Returns

  • unknown:

    unknown

    See the HTTP Content-Type header instead.

Примеры

запрос:

Download the completed history report with id = 1

https://api.voximplant.com/platform_api/DownloadHistoryReport/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&history_report_id=1

GetACDHistory

Gets the ACD history.

Parameters

  • Follow link for authentication parameter names and details.

  • 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 the ';' symbol.

  • acd_request_id:

    stringlist
    OPTIONAL

    The ACD request ID list separated by the ';' symbol.

  • acd_queue_id:

    intlist
    OPTIONAL

    The ACD queue ID list to filter separated by the ';' symbol.

  • user_id:

    intlist
    OPTIONAL

    The user ID list to filter separated by the ';' symbol.

  • operator_hangup:

    boolean
    OPTIONAL

    Set true to get the calls terminated by the operator.

  • unserviced:

    boolean
    OPTIONAL

    The unserviced calls by the operator.

  • min_waiting_time:

    number
    OPTIONAL

    The min waiting time filter.

  • rejected:

    boolean
    OPTIONAL

    The rejected calls by the 'max_queue_size', 'max_waiting_time' threshold.

  • with_events:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the bound events.

  • with_header:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to get a CSV file without the column names if the output=csv

  • desc_order:

    boolean
    OPTIONAL

    Set true to get records in the descent order.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  20

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

  • output:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  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.

Примеры

запрос:

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

https://api.voximplant.com/platform_api/GetACDHistory/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&from_date=2012-01-01%2000%3A00%3A00&to_date=2014-01-01%2000%3A00%3A00&with_events=true&count=2

ответ:

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

{
    "count": 2,
    "result": [
        {
            "events": [
                {
                    "time": "2014-03-20 17:43:15",
                    "type": "OPERATOR_UNREACHABLE",
                    "user_id": 661884,
                    "acd_session_event_id": 54
                }
            ],
            "user_id": 661885,
            "priority": 100,
            "rejected": false,
            "account_id": 1,
            "begin_time": "2014-03-20 17:41:33",
            "unserviced": false,
            "acd_queue_id": 1,
            "acd_request_id": "xLL_CWMYRiC7bG4ytf-WUk6kquVV9E9IlwowY68pdCQ",
            "operator_hangup": false,
            "waiting_duration": 161,
            "in_service_duration": 36,
            "acd_session_history_id": 123,
            "after_service_duration": 0
        },
        {
            "priority": 100,
            "rejected": false,
            "account_id": 1,
            "begin_time": "2014-03-20 17:44:35",
            "unserviced": true,
            "acd_queue_id": 1,
            "acd_request_id": "98oFQi0zSfKWCDurZPRtixYviCGiRk0agbtJbNOPrXs",
            "waiting_duration": 3028,
            "acd_session_history_id": 124
        }
    ],
    "total_count": 2
}

GetAuditLog

Gets the history of account changes.

Parameters

  • Follow link for authentication parameter names and details.

  • 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ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  Etc/GMT

    The selected timezone or the 'auto' value (will be used the account location).

  • audit_log_id:

    intlist
    OPTIONAL

    The audit history ID list separated by the ';' symbol.

  • filtered_admin_user_id:

    string
    OPTIONAL

    The admin user ID to filter.

  • filtered_ip:

    stringlist
    OPTIONAL

    The IP list separated by the ';' symbol to filter.

  • filtered_cmd:

    stringlist
    OPTIONAL

    The function list separated by the ';' symbol 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ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to get a CSV file without the column names if the output=csv

  • desc_order:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the descent order.

  • with_total_count:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set false to omit the 'total_count' and increase performance.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  100

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

  • output:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  json

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

  • is_async:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the asynchronous mode (for csv output only). If it's true, the request could be available via GetHistoryReports and DownloadHistoryReport methods.

Returns

  • result:

    [ AuditLogInfoType ]
  • 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).

Примеры

запрос:

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

https://api.voximplant.com/platform_api/GetAuditLog/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&from_date=2018-02-01%2000%3A00%3A00&to_date=2018-03-01%2000%3A00%3A00&filtered_cmd=BindSkill%3BAddSkill%3BDelSkill&advanced_filters=152&count=3

ответ:

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

{
    "count": 3,
    "result": [
        {
            "ip": "192.168.0.12",
            "cmd_args": {
                "skill_name": "manager"
            },
            "cmd_name": "AddSkill",
            "requested": "2018-02-04 19:35:13",
            "account_id": 1,
            "cmd_result": {
                "skill_id": 152
            },
            "audit_log_id": 58
        },
        {
            "ip": "192.168.0.12",
            "cmd_args": {
                "bind": true,
                "skill_id": [
                    152
                ],
                "acd_queue_id": [
                    151
                ]
            },
            "cmd_name": "BindSkill",
            "requested": "2018-02-05 19:36:19",
            "account_id": 1,
            "audit_log_id": 159
        },
        {
            "ip": "192.168.15.12",
            "cmd_args": {
                "skill_id": [
                    152
                ]
            },
            "cmd_name": "DelSkill",
            "requested": "2018-02-12 21:42:56",
            "account_id": 1,
            "cmd_result": {
                "deleted_skills": [
                    {
                        "skill_id": 152,
                        "skill_name": "officer"
                    }
                ]
            },
            "audit_log_id": 1073
        }
    ],
    "timezone": "Etc\/GMT"
}

GetCallHistory

Gets the call history.

Parameters

  • Follow link for authentication parameter names and details.

  • 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ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  Etc/GMT

    The selected timezone or the 'auto' value (will be used the account location).

  • call_session_history_id:

    intlist
    OPTIONAL

    The call session history ID list separated by the ';' symbol. The sessions IDs can be accessed in JS scenario via the sessionID property of the AppEvents.Started event

  • application_id:

    number
    OPTIONAL

    The application ID.

  • application_name:

    string
    OPTIONAL

    The application name, can be used instead of application_id.

  • user_id:

    intlist
    OPTIONAL

    The user ID list separated by the ';' symbol. If it's specified the output will contain only calls from/to any VoxImplant SDK related to the specified user.

  • rule_name:

    string
    OPTIONAL

    The rule name to filter.

  • remote_number:

    stringlist
    OPTIONAL

    The remote number list separated by the ';' symbol.

  • local_number:

    stringlist
    OPTIONAL

    The local number list separated by the ';' symbol.

  • call_session_history_custom_data:

    string
    OPTIONAL

    The custom_data to filter sessions.

  • with_calls:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the bound calls.

  • with_records:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the bound records.

  • with_other_resources:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set true to get other resources usage (see ResourceUsageType).

  • child_account_id:

    intlist
    OPTIONAL

    The child account ID list separated by the ';' symbol or the 'all' value.

  • children_calls_only:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the children account calls only.

  • with_header:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to get a CSV file without the column names if the output=csv

  • desc_order:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the descent order.

  • with_total_count:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to omit the 'total_count' and increase performance.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  20

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

  • output:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  json

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

  • is_async:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the asynchronous mode (for csv output only). If it's true, the request could be available via GetHistoryReports and DownloadHistoryReport methods.

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).

Примеры

запрос:

Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC

https://api.voximplant.com/platform_api/GetCallHistory/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&from_date=2012-01-01%2000%3A00%3A00&to_date=2014-01-01%2000%3A00%3A00&count=1&timezone=Etc/GMT

ответ:

Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC

{
    "count": 2,
    "result": [
        {
            "calls": [
                {
                    "call_id": 14,
                    "duration": 4,
                    "incoming": false,
                    "direction": "Russia",
                    "start_time": "2013-07-21 15:04:19",
                    "successful": true,
                    "local_number": "test1",
                    "remote_number": "7111",
                    "transaction_id": 0,
                    "remote_number_type": "pstn"
                },
                {
                    "call_id": 15,
                    "duration": 4,
                    "incoming": true,
                    "record_url": "http:\/\/1.2.3.4\/records\/\/2013\/07\/21\/224cf30d83f569da.1374419057.0.flv",
                    "start_time": "2013-07-21 15:04:20",
                    "successful": true,
                    "local_number": "7111",
                    "remote_number": "test1",
                    "transaction_id": 0,
                    "remote_number_type": "pstn"
                }
            ],
            "user_id": 1,
            "duration": 6,
            "account_id": 1,
            "start_date": "2013-07-21 15:04:17",
            "log_file_url": "http:\/\/1.2.3.4\/logs\/\/2013\/07\/21\/150417_6226d04fa72789c3.1374719057.0.log",
            "application_id": 2,
            "initiator_address": "192.168.15.103",
            "media_server_address": "192.168.15.103",
            "call_session_history_id": 14
        },
        {
            "calls": [
                {
                    "call_id": 16,
                    "duration": 4,
                    "incoming": false,
                    "direction": "Russia",
                    "start_time": "2013-07-21 15:04:46",
                    "successful": true,
                    "local_number": "test1",
                    "remote_number": "7111",
                    "transaction_id": 0,
                    "remote_number_type": "pstn"
                },
                {
                    "call_id": 17,
                    "duration": 3,
                    "incoming": true,
                    "record_url": "http:\/\/1.2.3.4\/records\/\/2013\/07\/21\/9586a463e96f7847.1374419086.0.flv",
                    "start_time": "2013-07-21 15:04:47",
                    "successful": true,
                    "local_number": "7111",
                    "remote_number": "test1",
                    "transaction_id": 0,
                    "remote_number_type": "pstn"
                }
            ],
            "active": false,
            "user_id": 1,
            "duration": 6,
            "account_id": 1,
            "start_date": "2013-07-21 15:04:44",
            "debugger_url": "some_name",
            "log_file_url": "http:\/\/0.0.0.0\/logs\/\/2013\/07\/21\/150444_507b8174ef0041de.1374419084.0.log",
            "application_id": 2,
            "initiator_address": "192.168.15.103",
            "media_server_address": "192.168.15.103",
            "call_session_history_id": 15
        }
    ],
    "timezone": "Etc\/GMT",
    "total_count": 934
}

Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC

{
    "result": 1,
    "history_report_id": 12
}

GetHistoryReports

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.

Parameters

  • Follow link for authentication parameter names and details.

  • history_report_id:

    number
    OPTIONAL

    The history report ID to filter

  • history_type:

    stringlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  calls

    The history report type list separated by the ';' symbol or the 'all' value. The following values are possible: calls, 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

    Is report completed?

  • desc_order:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the descent order.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  20

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

  • application_id:

    intlist
    OPTIONAL

    The application ID to filter. Can be a list separated by the ';' symbol or the 'all' value.

Returns

  • total_count:

    number

    The total found reports count.

  • count:

    number

    The returned reports count.

Примеры

запрос:

Get all the reports.

https://api.voximplant.com/platform_api/GetHistoryReports/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&history_type=all

ответ:

Get all the reports.

{
    "count": 3,
    "result": [
        {
            "error": {
                "msg": "No disc space.",
                "code": 24
            },
            "format": "csv",
            "created": "2015-10-07 18:40:01",
            "completed": "2015-10-07 18:40:02",
            "history_type": "calls",
            "history_report_id": 34
        },
        {
            "format": "csv",
            "created": "2015-10-07 18:40:05",
            "completed": "2015-10-07 18:40:06",
            "file_name": "call_history_2015-09-07_(12_of_12).csv",
            "file_size": 2511,
            "store_until": "2015-10-14",
            "history_type": "calls",
            "download_size": 687,
            "download_count": 1,
            "calculated_data": {
                "session_count": 12,
                "total_session_count": 12
            },
            "last_downloaded": "2015-10-07 18:40:18",
            "history_report_id": 35
        },
        {
            "format": "csv",
            "created": "2015-10-07 18:40:10",
            "completed": "2015-10-07 18:40:11",
            "file_name": "transaction_history_2015-09-07_(10.2_8.15).csv",
            "file_size": 3511,
            "store_until": "2015-10-14",
            "history_type": "transactions",
            "download_size": 698,
            "download_count": 2,
            "calculated_data": {
                "account_id": 1,
                "end_balance": "8.15 USD",
                "start_balance": "10.2 USD",
                "transaction_count": 120,
                "total_transaction_count": 120
            },
            "last_downloaded": "2015-10-07 18:40:19",
            "history_report_id": 36
        },
        {
            "format": "csv",
            "created": "2015-10-07 18:40:15",
            "history_type": "transactions",
            "history_report_id": 37
        }
    ],
    "total_count": 7
}

GetTransactionHistory

Gets the transaction history.

Parameters

  • Follow link for authentication parameter names and details.

  • 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ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  Etc/GMT

    The selected timezone or the 'auto' value (will be used the account location).

  • transaction_id:

    intlist
    OPTIONAL

    The transaction ID list separated by the ';' symbol.

  • payment_reference:

    string
    OPTIONAL

    The external payment reference to filter.

  • transaction_type:

    stringlist
    OPTIONAL

    The transaction type list separated by the ';' symbol. The following values are possible: periodic_charge, resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, robokassa_payment, gift, add_money, subscription_cancel, adjustment, wire_transfer, refund.

  • user_id:

    intlist
    OPTIONAL

    The user ID list separated by the ';' symbol.

  • child_account_id:

    intlist
    OPTIONAL

    The child account ID list separated by the ';' symbol or the 'all' value.

  • children_transactions_only:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the children account transactions only.

  • users_transactions_only:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the users' transactions only.

  • desc_order:

    boolean
    OPTIONAL

    Set true to get records in the descent order.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  20

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

  • output:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  json

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

  • is_async:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get records in the asynchronous mode (for csv output only). See the GetHistoryReports, DownloadHistoryReport functions.

Returns

  • end_balance:

    decimal

    The committed balance on the date equals from_date value. The parameter value is the number rounded to 4 decimal places and displays in the currency specified for the account.

  • total_count:

    number

    The total found transaction count.

  • timezone:

    string

    The used timezone. 'Etc/GMT' for example.

  • count:

    number

    The returned transaction count.

  • start_balance:

    decimal

    The committed balance on the date equals to_date value. The parameter value is the number rounded to 4 decimal places and displays in the currency specified for the account.

  • history_report_id:

    number

    The history report ID (async mode).

Примеры

запрос:

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.

https://api.voximplant.com/platform_api/GetTransactionHistory/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&from_date=2012-01-01%2000%3A00%3A00&to_date=2014-01-01%2000%3A00%3A00&count=3&transaction_type=gift%3Bmoney_distribution&timezone=Etc/GMT

ответ:

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.

{
    "count": 3,
    "result": [
        {
            "amount": 5,
            "currency": "USD",
            "account_id": 1,
            "performed_at": "2013-09-13 14:34:37",
            "transaction_id": 51,
            "transaction_type": "gift",
            "transaction_description": "Gift"
        },
        {
            "amount": -0.05,
            "currency": "USD",
            "account_id": 1,
            "performed_at": "2013-10-01 13:10:51",
            "transaction_id": 9784,
            "transaction_type": "money_distribution",
            "transaction_description": "To identity: ivan"
        },
        {
            "amount": 0.01,
            "currency": "USD",
            "account_id": 1,
            "performed_at": "2013-10-01 13:13:19",
            "transaction_id": 9786,
            "transaction_type": "money_distribution",
            "transaction_description": "From identity: maria"
        }
    ],
    "timezone": "Etc\/GMT",
    "total_count": 7
}

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.

{
    "result": 1,
    "history_report_id": 13
}