JSON API » customers » customers/export
Exports the configuration of all customers and optionally their data.
Input parameters
Requires authentication and the system role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
customer | Integer | ID of customer to be exported. | No | Customer of authentication user. |
deleted | Integer | 1 to return both non-deleted and deleted customers, 0 to only return non-deleted customers. | No | 0 |
recursive | Integer | 1 to return sub-customers recursively, 0 not to. | No | 0 |
data | Integer | 1 to return the data of each customer, 0 not to. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | No customers found. |
Data returned
A JSON object composed of arrays of fields, corresponding to the rows of the customers table in the database as well as their features. Additionally, if data=1 then the data of each customer is included, like voicemail messages, recordings, etc.
Example: With required parameters
http://enswitch.example.com/api/json/customers/export/?auth_username=user;auth_password=password{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":2, "name":"Customer 1", ... }, { "id":3, "name":"Customer 2", ... }, ] }
Change history
Version | Changes |
---|---|
3.14 | Function added. |