JSON API » huntgroups » huntgroups/destinations/list
Gets the fields of hunt group destinations. This can be either all destinations in a given hunt group, or all destinations with a given type and number in any hunt group. If the latter, and you have permission to view sub-customers, destinations in hunt groups in sub-customers will be included.
Input parameters
Requires authentication and the residential or user role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
dtype | String | Destination type. | Yes, unless huntgroup is specified. | Empty string. |
dnumber | String | Destination number. | Yes, unless huntgroup is specified. | Empty string. |
huntgroup | Integer | ID of hunt group. | Yes |
Specify either dtype and dnumber, or huntgroup, but not both.
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The hunt group does not exist, or you do not have permission to view it. |
Data returned
An array of fields, corresponding to the rows of the huntgroup_destinations table in the database.
Example: With dtype and dnumber
http://enswitch.example.com/api/json/huntgroups/destinations/list/?auth_username=user;auth_password=password;dtype=phone;dnumber=1234567{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "huntgroup":1, ... }, { "id":2, "huntgroup":2, ... } ] }
Example: With huntgroup
http://enswitch.example.com/api/json/huntgroups/destinations/list/?auth_username=user;auth_password=password;huntgroup=123{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "huntgroup":123, ... }, { "id":2, "huntgroup":123, ... } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |