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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
stypeStringSource object type. "alert", "phone", or "queue".Yes
snumberStringSource object number or name.Yes
startIntegerStart Unix timestamp.Recommended0
endIntegerEnd Unix timestamp.RecommendedNow.
archiveInteger1 to include archived entries, 0 not to.No0
typeStringType of event. Empty string for all.NoEmpty string.
descendingInteger1 to sort descending, 0 not to.No0

Failure to specify the start and end may put a heavy load on the database.

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your 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

VersionChanges
4.0archive input parameter added.
3.14end input parameter changed to return data < value instead of <= value.
3.13Function added.