Actions
Bug #2989
closedid field missing in host_parameters of hosts. (API v1 and v2)
Description
Issue in Foreman 1.2.0
In Foreman 1.0 it was possible to update a hosts, host_parameter name or value by using its id in a put request.
host_parameter example after get request for an host in foreman 1.0: (full details in attachment foreman-1.0.txt)
"host": {
"name": "cjiblx3211.example.nl",
....
....
"host_parameters": [
{
"host_parameter": {
"created_at": "2013-02-22T10:01:15Z",
"id": 399,
"name": "c_omgeving",
"priority": 4,
"reference_id": 132,
"updated_at": "2013-02-22T10:01:15Z",
"value": "o999"
}
},
But with foreman 1.2 api (v1 and v2) we have less values and and no id is in the result. (full details in attachment foreman-1.2.0.txt)
"host": {
"name": "cjiblx3211.example.nl",
....
....
"host_parameters": [
{
"host_parameter": {
"name": "c_omgeving",
"value": "o999"
}
},
Because we now have no id field we tried to use the host_parameters name to update its value but it results in an error. (name already taken, if I remember well)
It seems the current api has no options available to update an host_parameter name or value with the api of foreman 1.2.
Files
Actions