JSON API » speeddials » speeddials/import
Imports speed dials from a CSV file.
Input parameters
Requires authentication and the user role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| csv | String | The contents of the CSV file. | Yes | |
| button | String | Telephone key type. "blf", "blfxfer", "callers", "directory", "icom", "line", "services", "speeddial", or "speeddialxfer" | No | Empty string. |
| customer | Integer | ID of customer to import into. | No | Customer of authentication user. |
| delete | Integer | 1 to delete all speed dials first, 0 not to. | No | 0 |
| overwrite | Integer | 1 to allow overwriting of existing speed dials, 0 not to. | No | 0 |
| phone | String | Telephone line to import into. Empty string for shared speed dials. | No | Empty string. |
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 400 | Invalid input parameters specified. Check the key and message fields for more details. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 500 | An internal error occurred. Check the key and message fields for more details. |
Data returned
The number of speed dials created.
Example: With required parameters (csv field omitted for brevity)
http://enswitch.example.com/api/json/speeddials/import/?auth_username=user;auth_password=password;csv=...{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "count":123 } }
Change history
| Version | Changes |
|---|---|
| 3.13 | Function added. |
