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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
dtypeStringDestination type.Yes, unless huntgroup is specified.Empty string.
dnumberStringDestination number.Yes, unless huntgroup is specified.Empty string.
huntgroupIntegerID of hunt group.Yes

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

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The 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

VersionChanges
3.13Function added.