Project

General

Profile

Actions

Bug #23440

closed

API - Removing puppetclasses can't use friendly

Added by Iain Walmsley almost 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
API
Target version:
-
Difficulty:
trivial
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

With #22747 there's now validation on addition of Puppeclasses with the API which also allows use of friendly which is incredibly useful. On deletion however this was omitted (also means you aren't able to ascertain with the API response that you have, in-fact, tried to delete a valid puppetclass).

Should be able to do something like this;

-X DELETE https://foreman/api/v2/hosts/testhost/puppetclass_ids/ntp

or, indeed

-X DELETE https://foreman/api/v2/hosts/testhost/puppetclass_ids/invalid_class
response = Error

Actions

Also available in: Atom PDF