Project

General

Profile

Actions

Bug #7776

closed

It is possible to register multiple parameters with the same name using the REST API

Added by Geir Hedemark over 9 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are differentClosedOri Rabin07/20/2014Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Is duplicate of Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are different added
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Feedback

Thanks for the report, I think we've fixed this via #6695 for Foreman 1.7. If you get the opportunity, please try out our nightly builds to verify.

Actions #3

Updated by Anonymous almost 7 years ago

  • Status changed from Feedback to Resolved

no reaction, closing

Actions

Also available in: Atom PDF