JSON API » events » events/list
Lists call events. For now only SIP registrations are recorded, and only if the system is configured to do so. Other event types may be added in future versions.
Input parameters
Requires authentication and the user role privilege. If stype=phone is specified, the administrator or wholesale role privilege is also required.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
stype | String | Source object type. "alert", "phone", or "queue". | Yes | |
snumber | String | Source object number or name. | Yes | |
start | Integer | Start Unix timestamp. | Recommended | 0 |
end | Integer | End Unix timestamp. | Recommended | Now. |
type | String | Type of event. Empty string for all. | No | Empty string. |
descending | Integer | 1 to sort descending, 0 not to. | No | 0 |
Failure to specify the start and end may put a heavy load on the database.
Responses
Code | Description |
---|---|
200 | 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. |
Data returned
An array of fields, one row for each events.
Example: With required and recommended parameters
http://enswitch.example.com/api/json/events/list/?auth_username=user;auth_password=password;stype=phone;snumber=1234567;start=1230000000;end=1240000000{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "stype":"phone", "snumber":"1234567", ... }, { "stype":"phone", "snumber":"1234567", ... }, ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |