JSON API » configs » configs/get
Gets the fields of a configuration setting.
Input parameters
Authentication is optional for most configuration settings. If supplied, the time and person who last updated the setting will be returned. A few configuration settings containing sensitive information such as usernames and passwords require authentication and a specific role privilege. Requesting these configuration settings without the correct authentication will return 401 or 402.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | No | None. |
auth_password | String | Authentication password. | No | None. |
name | String | Name of configuration setting to get. | Yes | |
default | String | A 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. | No | None. |
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The 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
Version | Changes |
---|---|
4.0 | Authentication required for sensitive configuration settings added. |
3.13 | Function added. |