Project

General

Profile

Actions

Bug #4461

closed

The Associations section for the API has some inconsistencies

Added by David Davis almost 11 years ago. Updated over 6 years ago.

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

Description

Example:

To update an association for an object that contains a collection of other objects, there are a few options. First you can set the ids:
$ curl -k -u admin:changeme -H "Accept: version=2,application/json" \
-H "Content-Type: application/json" -X POST \
-d '{ "host_names": ["enel.first", "celeborni.first", "elwe.first"] }' \
https://foreman.example.com/api/hostgroups/telerin
Actions

Also available in: Atom PDF