Project

General

Profile

Actions

Bug #2989

closed

id field missing in host_parameters of hosts. (API v1 and v2)

Added by Ronny M over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

foreman-1.0.txt foreman-1.0.txt 4.11 KB Ronny M, 08/29/2013 05:47 PM
foreman-1.2.0.txt foreman-1.2.0.txt 2.29 KB Ronny M, 08/29/2013 05:47 PM
with-api.txt with-api.txt 1.27 KB Ronny M, 08/31/2013 01:49 PM
without-api.txt without-api.txt 2.47 KB Ronny M, 08/31/2013 01:49 PM
Actions

Also available in: Atom PDF