JSON API » codes » codes/list
Gets the fields of all feature codes visible to the user in the given customer.
Input parameters
Requires authentication and the user role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
customer | Integer | ID of customer to get feature codes for. | No | Customer of authentication user. |
count | Integer | 1 to return a count, 0 to return full data. | No | 0 |
descending | Integer | 1 to sort descending, 0 not to. | 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 |
sort | String | Field to sort by. "code", "destination", or "dnumber". | No | "code" |
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid customer specified. |
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 required parameters
http://enswitch.example.com/api/json/codes/list/?auth_username=user;auth_password=password{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "code":"100", "description":"example1", ... }, { "code":"101", "description":"example2", ... } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |