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.
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 |
---|---|
3.13 | Function added. |