Update system settings

put

/api/20210901/system/settings

Update one or more system setting with a valid key and value.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UpdateSettingsDetails
Type: object
An object representing the settings update payload.
Show Source
Back to Top

Response

200 Response

Successful operation.

400 Response

Bad Request (invalid query parameters, malformed headers, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

401 Response

Unauthorized (missing or expired credentials, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

403 Response

Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

409 Response

Conflict (operation results in constraint violation, the operation is incompatible with the current state, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

500 Response

Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

These examples show you how to update one or more system settings in Oracle Analytics Cloud.

  • Example 1 - Update system settings using a JSON file
  • Example 2 - Update system settings directly

Example 1 Update system settings using a JSON file

In this example, you restrict the size (KB) of emails sent from Oracle Analytics Cloud and the number of email recipients. The system settings that control this behavior are Maximum Email Size (KB) and Maximum Number of Recipients per Email. The REST API keys for these settings are EmailMaxEmailSizeKB and EmailMaxRecipients.

cURL Example

First, obtain REST API key values for the system settings you want to update. See REST API Keys for System Settings.

Next, create a JSON file that contains the systems settings you want to update and their new values. For example, if you want to update Maximum Email Size (KB) and Maximum Number of Recipients per Email, create a JSON file called update_system_settings.json with a payload that looks like this.
{
     "items":[               
       {                   
         "key": "EmailMaxRecipients",                   
         "value": "512"               
       },               
       {                   
         "key": "EmailMaxEmailSizeKB",                   
         "value": "10240"               
       }           
      ]
 }
If you want to update a single setting, the payload looks like this:
{
     "items":[               
       {                   
         "key": "EmailMaxRecipients",                   
         "value": "512"               
       }           
      ]
 }

Run the cURL command calling the JSON file (for example, update_system_settings.json):

curl -i \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --request PUT 'https://<hostname>/api/20210901/system/settings' \
  --data @update_system_settings.json

Example of Response Header

Not applicable.

Example of Response Body

If successful, the response body returns the 200 response code. For example:

Status 200

Example 2 Update system settings directly

In this example, you restrict the number of email recipients through the system setting Maximum Number of Recipients per Email. The REST API key for this setting is EmailMaxRecipients.

cURL Example

First, obtain REST API key values for the system setting you want to update. See REST API Keys for System Settings.

To update a single setting, the payload looks like this:
{
     "items":[               
       {                   
         "key": "EmailMaxRecipients",                   
         "value": "512"               
       }           
      ]
 }

Run the cURL command :

curl -i \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --request PUT 'https://<hostname>/api/20210901/system/settings' \
  --data '{"items":[ {   \                
         "key": "EmailMaxRecipients",  \                 
         "value": "512"   \         
       } ] }'

Example of Response Header

Not applicable.

Example of Response Body

If successful, the response body returns the 200 response code. For example:

Status 200
Back to Top