Update Connect Profile
Updates a specified connect profile.
HTTP Request
PUT /api/sonar/connect-profiles/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d name="Hyper SQL" \
-d description="Embedded file database" \
-d configs="{""connection_string"":""jdbc:hsqldb:file:testdb"", ""user"":""SA"", ""password"":""NEW_PASSWORD"", ""read_only"":false, ""update_keys"": [""password""]}" \
-X PUT \
https://HOSTNAME/api/sonar/connect-profiles/b7f00412-8720-4a8f-ac35-7d7f359f797e
Request Parameters
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| guid | String | Connect profile GUID | 36 characters |
Request Body Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| name | O | String | Display name of the connect profile | Minimum 1 to maximum 50 characters |
| description | X | String | Connect profile description | Maximum 2,000 characters |
| grant_users | X | String list | GUID list of the users with privileges | Comma-separated list |
| grant_groups | X | String list | GUID list of the user groups with privileges | Comma-separated list |
| configs | O | String key/value | Configuration values. Refer to the below description. | See Get Connect Profile Options. |
| connection_check_enabled | No | Boolean | Whether connection check is enabled | Default: false |
If you do not include protected configuration keys in the configs parameter when requesting a connect profile modification, the previous configuration values are retained. To update a protected configuration key with a new value, the key/value pair in the configs parameter must include the update_keys key and a list of protected key names.
Without the update_keys, it is unable to distinguish whether you are sending null to keep an existing configuration value or to delete an existing configuration value.
Success Response
{}
Error Responses
Connect profile is not found
{
"error_code": "profile-not-found",
"error_msg": null
}
Required argument is missing
{
"error_code": "null-argument",
"error_msg": "name should be not null"
}
Invalid argument length
{
"error_code": "invalid-argument",
"error_msg": "'name' must be less than or equal to 50 characters."
}
Missing required configuration value
{
"error_code": "invalid-argument",
"error_msg": "config option must be not null: connection_string"
}
No privileges to manage the company
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}