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.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
dtype | String | Destination type. | Yes, unless queue is specified. | Empty string. |
dnumber | String | Destination number. | Yes, unless queue is specified. | Empty string. |
queue | Integer | ID 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
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The 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
Version | Changes |
---|---|
3.13 | Function added. |