JSON API » phones » phones/get
Gets the fields of a telephone line.
Input parameters
Requires authentication and the residential, user, or wholesale role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
name | Integer | Name of telephone line to get. | Yes | |
password | Integer | 1 to return the password, 0 not to. See note below. | No | 0 |
The password is only returned if password=1 is specified and the user is an administrator or owns the telephone line.
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The telephone line does not exist, or you do not have permission to view it. |
Data returned
Fields of telephone line. 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. |
Example: With required parameters
http://enswitch.example.com/api/json/phones/get/?auth_username=user;auth_password=password;name=1234567{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "name":"1234567", "description":"", ... } }
Change history
Version | Changes |
---|---|
3.14 | password input parameter added. |
3.13 | Function added. |