JSON API » numbers » numbers/system/list
Gets the fields of all numbers.
Input parameters
Requires authentication and the system role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| assigned | Integer | 1 to return only numbers assigned to customers, 0 to return all. | No | 0 |
| class | Integer | Only return numbers in number class, 0 to return all. | No | 0 |
| directory | Integer | 1 to return only numbers marked as in directory, 0 to return all. | No | 0 |
| ingroup | Integer | Only return numbers in inbound group, 0 to return all. | No | 0 |
| search | String | Only return numbers containing this string. Empty string for all. | No | Empty string. |
| count | Integer | 1 to return a count, 0 to return full data. | No | 0 |
| limit | Integer | The maximum results to return. 0 for all. | No | 0 |
| offset | Integer | The result to start at. 0 for the first. | No | 0 |
| pages | Integer | 1 to return a reduced set of data for generating the pages select box, 0 to return full data. | No | 0 |
Failure to specify the class or inbound group may put a heavy load on the database.
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 401 | The authentication details provided are invalid. |
| 402 | Your 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
| Version | Changes |
|---|---|
| 3.13 | Function added. |
