Share this page

# Setting configuration parameters with the REST API

This section provides information for setting ALM Octane configuration parameters using the REST API.

Tip: Admins can also set configuration parameters in ALM Octane Settings.

In this topic:

## REST API quick-start for admins

Admins can use these quick-start instructions to change configuration parameters. This quick-start is helpful for admins that do not usually work with the REST API.

1. Authenticate.

   POST this REST API request sending your user name and password:

   `http[s]://<server>:<port>/authentication/sign_in`

   Specify these headers:

   Authentication method | Header | Value
   --- | --- | ---
   All | Content-Type | application/json
   Basic | ALM-OCTANE-TECH-PREVIEW | true

   For complete details, see Authenticating.

2. Send REST API requests to set configuration parameters.

   Scope and syntax

   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.

   Examples

   GET requests | 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 requests | 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 ALM Octane 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 requests | 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

## Configuration parameter reference

For a list of the available configuration parameters, see Configuration parameters.

Back to top

## Examples

Activating basic authentication (SUPPORTS_BASIC_AUTHENTICATION)

Both the site admin and the space admin can activate basic authentication.

Activating basic authentication by the site admin

The site admin can activate basic authentication for a specific space using the configuration parameter Setting configuration parameters with the REST API.

The ID for the space for which you are enabling basic authentication is specified using sharedspace_id.

    POST .../admin/context_parameters/

    {
      "data": [
        {
          "name": "SUPPORTS_BASIC_AUTHENTICATION",
          "sharedspace_id": 2001,
          "value": "true"
        }
      ]
    }

Activating basic authentication by the space admin

The space admin can also activate basic authentication for a specific space using the parameter Setting configuration parameters with the REST API, with the following syntax:

    PUT  .../api/shared_spaces/<space_id>/params/SUPPORTS_BASIC_AUTHENTICATION

    {
        "value":"true"
    }

Back to top

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ValueEdge & ALM Octane Help Center ValueEdge ALM Octane Help 16.0.100-16.0.400 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: