JSON API » phones » phones/get

Gets the fields of a telephone line.

Input parameters

Requires authentication and the residential, user, or wholesale role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameIntegerName of telephone line to get.Yes
passwordInteger1 to return the password, 0 not to. See note below.No0

The password is only returned if password=1 is specified and the user is an administrator or owns the telephone line.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The 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:

NameTypeDescription
displayStringThe 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

VersionChanges
4.3Function no longer returns provision1 field.
3.14password input parameter added.
3.13Function added.