JSON API » numbers » numbers/system/list

Gets the fields of all numbers.

Input parameters

Requires authentication and the system role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
assignedInteger1 to return only numbers assigned to customers, 0 to return all.No0
classIntegerOnly return numbers in number class, 0 to return all.No0
directoryInteger1 to return only numbers marked as in directory, 0 to return all.No0
ingroupIntegerOnly return numbers in inbound group, 0 to return all.No0
searchStringOnly return numbers containing this string. Empty string for all.NoEmpty string.
countInteger1 to return a count, 0 to return full data.No0
limitIntegerThe maximum results to return. 0 for all.No0
offsetIntegerThe result to start at. 0 for the first.No0
pagesInteger1 to return a reduced set of data for generating the pages select box, 0 to return full data.No0

Failure to specify the class or inbound group may put a heavy load on the database.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.

Data returned

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

Example: With inbound group

http://enswitch.example.com/api/json/numbers/system/list/?auth_username=user;auth_password=password;ingroup=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "number":"2125551234", "ingroup":123, ... }, { "number":"2125551235", "ingroup":123, ... } ] }

Change history

VersionChanges
3.13Function added.