JSON API » queues » queues/events/create
Creates a new queue event. Only has effect if the queue is set to record events.
Input parameters
Requires authentication and the administrator role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
queue | Integer | ID of queue to create event for. | Yes | |
event | String | Event to record. Empty string for none. | Recommended | Empty string. |
callerid | String | Callerid of call event is for. Empty string for none. | No | Empty string. |
callid | String | Callid of call event is for. Empty string for none. | No | Empty string. |
channel | String | Asterisk channel of call event is for. Empty string for none. | No | Empty string. |
dtype | String | Destination type. "forward", "peer", "phone", "sipuri", or empty string for none. | No | Empty string. |
dnumber | String | Destination number. Empty string for none. | No | Empty string. |
keypress | String | key press that triggered event. Empty string for none. | No | Empty string. |
position | Integer | Position of call in queue. 0 for not applicable. | No | 0 |
time | Integer | Unix timestamp. | No | Now. |
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. |
404 | The queue does not exist, or you do not have permission to view it. |
Data returned
No data is returned.
Example: With recommended parameters
http://enswitch.example.com/api/json/queues/events/create/?auth_username=user;auth_password=password;queue=123;event=TEST+EVENT{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |