JSON API » huntgroups » huntgroups/update
Updates an existing hunt group.
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 | |
anumber | String | Destination number if no destinations are available to be called. | No | Current value. |
atype | Integer | Destination type if no destinations are available to be called. | No | Current value. |
bnumber | String | Destination number if a destination returns "busy", and no destination returns "no answer". | No | Current value. |
btype | Integer | Destination type if a destination returns "busy", and no destination returns "no answer". | No | Current value. |
id | Integer | ID of hunt group to update. | Yes | |
allow_forwards | Integer | 1 to allow destinations to forward calls, 0 not to. | No | Current value. |
description | String | Description. | No | Current value. |
dnumber | String | Destination number if no levels answer. This is the default exit number. | No | Current value. |
dtype | Integer | Destination type if no levels answer. This is the default exit type. | No | Current value. |
music | Integer | ID of music class to play. 0 for default. | No | Current value. |
music_ringing | Integer | 1 to play music while ringing, 0 to play ringing. | No | Current value. |
name | String | Name. | No | Current value. |
owner | Integer | ID of owner. 0 for none. | No | Current value. |
panel | Integer | 1 to show in control panel, 0 not to. | No | Current value. |
recordgroup | Integer | ID of record group. 0 for none. | No | Current value. |
ringtime | Integer | Time to ring each level in seconds. May be overridden per level. | No | Current value. |
screen | Integer | 1 to play the callerid, 2 to ask the caller to record their name, 0 not to screen. | No | Current value. |
type | String | Type of hunt group. "circular", "linear", "smart_circular", or "smart_linear". | No | Current value. |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
201 | Input passed validation. Only returned if validation=1. |
204 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
404 | The hunt group does not exist, or you do not have permission to update it. |
Data returned
No data is returned.
Example: Changing the name
http://enswitch.example.com/api/json/huntgroups/update/?auth_username=user;auth_password=password;id=123;name=example{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
4.1 | anumber, atype, bnumber, and btype parameters added. |
3.13 | Function added. |