JSON API » speeddials » speeddials/import

Imports speed dials from a CSV file.

Input parameters

Requires authentication and the user role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
csvStringThe contents of the CSV file.Yes
buttonStringTelephone key type. "blf", "blfxfer", "callers", "directory", "icom", "line", "services", "speeddial", or "speeddialxfer"NoEmpty string.
customerIntegerID of customer to import into.NoCustomer of authentication user.
deleteInteger1 to delete all speed dials first, 0 not to.No0
overwriteInteger1 to allow overwriting of existing speed dials, 0 not to.No0
phoneStringTelephone line to import into. Empty string for shared speed dials.NoEmpty string.

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
500An 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

VersionChanges
3.13Function added.