Actions
Bug #7776
closedIt is possible to register multiple parameters with the same name using the REST API
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
When doing several equal posts to https://<host>/api/v2/hostgroups/<hostgroupname>/parameters with a json of { "parameter" : { "name" : "foo", "value" : "something" } }, I am able to create several parameters named "foo".
When manipulating the same parameters with put on https://<host>/api/v2/hostgroups/<hostgroupname>/parameters/<internal id of param> with the json of { "parameter" : { "value" : "something" } }, an error stating
{
"error": {"id":3528,"errors":{"name":["has already been taken"]},"full_messages":["Name has already been taken"]}
}
is returned. I feel that this error should also be returned on the second POST above in the interests of providing a clear and orthogonal API.
Actions