JSON API » queues » queues/destinations/list

Gets the fields of queue destinations. This can be either all destinations in a given queue, or all destinations with a given type and number in any queue. If the latter, and you have permission to view sub-customers, destinations in queues in sub-customers will be included.

Input parameters

Requires authentication and the user role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
dtypeStringDestination type.Yes, unless queue is specified.Empty string.
dnumberStringDestination number.Yes, unless queue is specified.Empty string.
queueIntegerID of queue to get destinations for.Yes, unless dtype and dnumber are specified.0

Specify either dtype and dnumber, or queue, but not both.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The queue does not exist, or you do not have permission to view it.

Data returned

An array of fields, corresponding to the rows of the queue_destinations table in the database.

Example: With dtype and dnumber

http://enswitch.example.com/api/json/queues/destinations/list/?auth_username=user;auth_password=password;dtype=phone;dnumber=1234567

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "queue":1, ... }, { "id":2, "queue":2, ... } ] }

Example: With queue

http://enswitch.example.com/api/json/queues/destinations/list/?auth_username=user;auth_password=password;queue=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "queue":123, ... }, { "id":2, "queue":123, ... } ] }

Change history

VersionChanges
3.13Function added.