JSON API » phones » phones/list
Gets the fields of all telephone lines visible to the user in the given customer.
Input parameters
Requires authentication and the residential or user role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
count | Integer | 1 to return a count, 0 to return full data. | No | 0 |
customer | Integer | ID of customer to get telephone lines for. | No | Customer of authentication user. |
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 |
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 phones table in the database. See phones/update for the meaning of most of these fields. In addition, the following extra field is returned:
Name | Type | Description |
---|---|---|
display | String | The name of the telephone line for display purposes. |
Note that the password field will only be returned if the user's role allows it.
Example: With required parameters
https://www.015pbx.net/local/api/json/phones/list/?auth_username=user;auth_password=password{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":"1", "name":"1234567", ... }, { "id":"2", "name":"1234568", ... } ] }