Creating Settings
Creates a setting, e.g., to toggle user action availability.
| Name | In | Type | Description |
|---|
param | body | string | The action to toggle: instance.action.change_password, change passwordinstance.action.reinstall, reinstall (containers only)instance.action.repair, repair (containers only)backup.action.attach, attach backup (VEs with backups only)
|
instance_type | body | string | Limits the setting scope: vm or ct applies the setting only to VMs or containers.all applies the setting to all virtual environments.
|
module_type | body | string | ui hides the button from the web panel, but the action can still be requested via the API, e.g., using curl.api leaves the button on the web panel but blocks its API call.all combines the effects of the other two values.
|
value | body | string | Enables (1) or disables (0) the action specified in the setting. |
Request example:
1
2
3
4
5
6
7
8
| # curl -s -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
"param": "instance.action.reinstall",
"instance_type": "all",
"module_type": "all",
"value": "0"
}
' https://<controller_hostname>/api/v1/settings
|
Response example:
1
2
3
4
5
6
7
8
9
10
| {
"value": "1",
"created_at": "2020-12-18T08:16:37.351282",
"applies_to": {
"instance_type": "all",
"module_type": "all"
},
"param": "instance.action.reinstall",
"updated_at": null
}
|