JSON API » subscriptions » subscriptions/list

Gets the fields of all subscriptions for a telephone line.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
snumberStringSubscribing telephone line.Yes
dtypeStringMonitored destination type. Empty string for all.NoEmpty string.
eventStringSubscription event package name. Empty string for all.NoEmpty string.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The telephone line does not exist, or you do not have permission to view it.

Data returned

An array of fields, corresponding to the rows of the subscriptions table in the database.

Example: With required parameters

http://enswitch.example.com/api/json/subscriptions/list/?auth_username=user;auth_password=password;stype=phone;snumber=1234567

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "snumber":"1234567", ... }, { "id":2, "snumber":"1234567", ... } ] }

Change history

VersionChanges
3.14dtype input parameter changed default from "phone" to empty string. event input parameter changed default from "busy" to empty string.
3.13Function added.