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 almost 10 years ago. Updated over 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

Also available in: Atom PDF