JSON API » queues » queues/update
Updates an existing queue.
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 | |
id | Integer | ID of queue to update. | Yes | |
allow_forwards | Integer | 1 to allow destinations to forward calls, 0 not to. | No | Current value. |
answer | Integer | 1 to request destinations to auto-answer, 0 not to. | No | Current value. |
atype | String | Destination type when exiting the queue due to no destinations available. | No | "hangup" |
anumber | String | Destination number when exiting the queue due to no destinations available. | No | Empty string. |
callback | Integer | -1 to offer callback on pressing *, 0 not to, 1 or above to offer callback and validate number using class of service with this ID. | No | Current value. |
callerid | String | Callerid to use on callback. Empty string for unknown. | No | Current value. |
description | String | Description. | No | Current value. |
destinations_same | Integer | Set all destinations to the same values as dtype and dnumber. | No | Current value. |
dtype | String | Destination type when exiting the queue due to caller pressing *. | No | "hangup" |
dnumber | String | Destination number when exiting the queue due to caller pressing *. | No | Empty string. |
events | Integer | 1 to record queue events, 0 not to. | No | Current value. |
events_url | String | URL to send events to. Empty string for none. | No | Empty string. |
htype | String | Destination type when exiting the queue due to hold time. | No | "hangup" |
hnumber | String | Destination number when exiting the queue due to hold time. | No | Empty string. |
holdtime | Integer | Maximum hold time in seconds. -1 for no limit. | No | Current value. |
maximum_queued | Integer | Maximum queued calls. -1 for no limit. | No | Current value. |
missed_logout | Integer | Number of missed calls to set destination to unavailable. 0 for never. | No | Current value. |
music | Integer | ID of music class to play. 0 for default. | No | Current value. |
name | String | Name. | No | Current value. |
ntype | String | Destination type when exiting the queue due to number of calls. | No | "hangup" |
nnumber | String | Destination number when exiting the queue due to number of calls. | No | Empty string. |
no_destinations | Integer | 1 to exit queue if no destinations are available on entering the queue, 0 not to. | 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. |
play_interval | Integer | Seconds to play message and/or position in queue. | No | Current value. |
play_message | Integer | 1 to play message file, 0 not to. | No | Current value. |
play_position | Integer | -1 to always play position in queue, 0 not to, 1 or above to play position for callers up to that position number. | No | Current value. |
play_waittime | Integer | -1 to always play wait time in queue, 0 not to, 1 or above to play wait time for callers up to that number of seconds. | No | Current value. |
play_start | Integer | 1 to play message and/or position on entering queue, 0 not to. | No | Current value. |
priority | Integer | Priority of queue from 1 to 10. | No | Current value. |
ringtime | Integer | Seconds to ring destinations for before return caller to queue. | No | Current value. |
screen | Integer | 1 to screen calls and play callerid, 2 to ask callers to record name, 0 not to screen. | No | Current value. |
strategy | String | Ring strategy within a priority. "all", "least_recent", or "least_recent_all". | No | Current value. |
type | String | Ring strategy for priorities. "circular", "linear", "smart_circular", or "smart_linear". | No | Current value. |
wrapuptime | Integer | Seconds to leave destination idle for before delivering next call. | 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 queue 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/queues/update/?auth_username=user;auth_password=password;id=123;name=example{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
4.1 | play_waittime parameter added. |
3.14 | atype, anumber, destinations_same, events_url, htype, hnumber, ntype, and nnumber input parameters added. callback input parameter changed to -1 for always and to specify class of service ID. play_position input parameter changed to -1 for always and to specify highest position. |
3.13 | Function added. |