logo.png phones/list JSON API function

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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
countInteger1 to return a count, 0 to return full data.No0
customerIntegerID of customer to get telephone lines for.NoCustomer of authentication user.
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

Responses

CodeDescription
200Success.
400Invalid customer specified.
401The authentication details provided are invalid.
402Your 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:

NameTypeDescription
displayStringThe 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", ... } ] }