JSON API » peers » peers/get

Gets the fields of a peer.

Input parameters

Requires authentication and the user or commerce role privileges. If you do not have the system role privilege, only the id and name fields are returned.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of peer to get.Yes
customerIntegerID of customer.NoCustomer of authentication user.
destinationInteger1 to only return peer if customer can route to it, 0 for any.No0

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The peer does not exist, or you do not have permission to route to it.

Data returned

Fields of peer.

Example: With required parameters

http://enswitch.example.com/api/json/peers/get/?auth_username=user;auth_password=password;id=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "name":"example", ... } }

Change history

VersionChanges
3.13Function added.