Set global config
Sets the value of the specified global configuration key.
Required Permissions
Requires the Cluster Administrator role.
HTTP Request
PUT /api/sonar/global-configs/:key
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d value=ko \
-X PUT \
https://HOSTNAME/api/sonar/global-configs/default_locale
Request Parameters
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| key | String | Configuration key | Case-insensitive |
Request Body Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| value | Yes | String | Configuration value |
Success Response
{}
Error Responses
Attempt to update the version key
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "cannot change value of version"
}
Invalid configuration key
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "global option key should be not null"
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}