Problem:
Using the documentation for the API I can update the value of the location but I can’t update the default parameter for the location.
The following API call works:
curl -H "Content-Type:application/json" -H "Accept:application/json" -u xymon:Applied -X PUT https://foreman.xxxx.xxxx.nl/api/settings/107 -d '{ "setting": { "value": "Default Location" }}'
However when I attempt the same command but tp update the default value:
curl -H "Content-Type:application/json" -H "Accept:application/json" -u xymon:Applied -X PUT https://foreman.xxxx.xxxx.nl/api/settings/107 -d '{ "setting": { "default": "Default Location" }}'
I get this error:
"error": {"message":"No setting value provided."}
I’ve also tried the above API call with both sets of values like this:
curl -H "Content-Type:application/json" -H "Accept:application/json" -u xymon:Applied -X PUT https://foreman.xxxx.xxxx.nl/api/settings/107 -d '{ "setting": { "value": "Default Location", "default": "Default Location" }}'
The above command executes successfully but will only update ‘value’
Expected outcome:
To set the default location
Foreman and Proxy versions:
1.21.3