JSON API » configs » configs/get

Gets the fields of a configuration setting.

Input parameters

Authentication is optional. If supplied, the time and person who last updated the setting will be returned.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.NoNone.
auth_passwordStringAuthentication password.NoNone.
nameStringName of configuration setting to get.Yes
defaultStringA default value to return if the setting does not exist. If not set and the configuration setting does not exist, a 404 error is returned.NoNone.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The configuration setting does not exist, and no default was provided.

Data returned

Fields of the configuration setting.

Example: With required parameters

http://enswitch.example.com/api/json/configs/get/?name=asterisk_version

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "name":"asterisk_version", "value":"11", ... } }

Change history

VersionChanges
3.13Function added.