JSON API » peers » peers/costs/get

Gets the fields of a peer cost.

Input parameters

Requires authentication and the system owner role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of peer cost.Yes

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The peer cost does not exist.

Data returned

Fields of peer cost.

Example: With required parameters

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

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":2, "peer":123, "called_prefix":"011", ... } }

Change history

VersionChanges
3.15Function added.