Set configuration parameters
This section provides information for setting configuration parameters using the REST API.
For a list of the available configuration parameters, see Configuration parameters.
REST API requests for configuration parameters
The following request formats are available for setting configuration parameters with the REST API.
| Scope | Admin | Request format |
|---|---|---|
| Site | Site admin |
The site admin uses this format to retrieve and set configuration parameters that affect the entire site. |
| Space | Site admin |
The site admin uses this format to set configuration parameters in context of a specific space. When sending REST API requests to set configuration parameters on the space level, make sure to specify the space ID and send an ALM-OCTANE-TECH-PREVIEW header with the value true. |
| Space | Space admin |
The space admin uses this format to set configuration parameters in context of a specific space. When sending REST API requests to set configuration parameters on the space level, make sure to specify the space ID and send an ALM-OCTANE-TECH-PREVIEW header with the value true. |
Examples
| Request type | Description |
|---|---|
|
GET |
To retrieve existing configuration parameters using the REST API, send a GET request.
Use the response to determine if you send PUT or POST requests to set a configuration parameter value. If the parameter you need to configure is not listed, send a POST request. Sample GET response excerpt: {
"total_count": 310,
"data": [
{
"id": "SERVER_BASE_URL",
"value": "http://<server>:<port>",
"modified_by": "SiteAdminUser@TheCompany.com",
"last_modified": "2017-03-22T20:04:38Z",
"type": "param"
},... ... ...
{
"id": "MAIL_SERVER_HOST",
"value": null,
"modified_by": null,
"last_modified": "1970-01-01T00:00:00Z",
"type": "param"
},... ... ... } |
|
PUT |
To set a value for an existing configuration parameter, send a PUT request.
Sample PUT for site-level configuration parameters, by site admin: PUT .../admin/params {
"data": [ {
"id": "<site_param_name>",
"value": <value>} ] } Sample PUT for space level parameters, by space admin: When the space admin is working with configuration parameters on the space level:
PUT .../api/shared_spaces/<space_id>/params/SUPPORTS_BASIC_AUTHENTICATION
{
"value":"true"
}
|
|
POST |
To set a value for a new configuration parameter, send a POST request. Sample POST for space-level configuration parameters, by site admin: When the site admin is working with configuration parameters on the space level:
POST .../admin/context_parameters/ {
"data": [
{
"name": "<site_param_name>",
"sharedspace_id": <id>,
"value": <value>
}
]
}
|

