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

<operation> .../admin/params/...

The site admin uses this format to retrieve and set configuration parameters that affect the entire site.

Space Site admin

<operation> .../admin/context_parameters/...

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

<operation> .../api/shared_spaces/<space_id>/params/...

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.

Back to top

Examples

Request type Description

GET

To retrieve existing configuration parameters using the REST API, send a GET request.

GET .../admin/params

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.

  • You can set configuration parameters on the site level and on the space level.

  • You can set multiple configuration parameters in the same PUT request.

  • You do not have to reset the configuration parameters after restarting the server.

  • Parameter values can be a maximum of 1000 characters.

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:

  • Make sure to specify the space ID in the PUT.

  • Send an ALM-OCTANE-TECH-PREVIEW header with the value true in requests to configure the parameter.

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:

  • Make sure to specify the space ID.

  • Send an ALM-OCTANE-TECH-PREVIEW header with the value true in requests to configure the parameter.

POST .../admin/context_parameters/
{
  "data": [
    {
      "name": "<site_param_name>",
      "sharedspace_id": <id>,
      "value": <value>
    }
  ]
}

Back to top