Project

General

Profile

Feature #4913

We need to allow users to pass associations in

Added by David Davis over 5 years ago. Updated about 2 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Per the V2 spec, users should be able to pass in model json with attributes for associations in order to update a model's association. See the "Many-to-One and Many-to-Many" section below:

http://theforeman.org/manuals/1.4/index.html#5.1.7HandlingAssociations

History

#1 Updated by David Davis over 5 years ago

I think Joseph had to implement some code to deal with this. It would be worth checking the foreman codebase.

#2 Updated by David Davis over 5 years ago

Here's the example CURL:

$ curl -k -u admin:changeme -H "Accept: version=2,application/json" \
    -H "Content-Type: application/json" -X POST \
    -d '{ "domains": [{ "name": "earendil", "id": 1}, { "name": "turgon", "id": 3 }] }' \
    https://foreman.example.com/api/subnets/iluvatar

#3 Updated by David Davis over 5 years ago

Also, we need to support requests that have arrays with strings (of name or label?) for associations. I think currently we only support ids (e.g. content_view_ids). Can be handled separately.

#4 Updated by Eric Helms over 5 years ago

  • Triaged changed from No to Yes

#5 Updated by Eric Helms almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 114

#6 Updated by John Mitsch about 2 months ago

  • Status changed from New to Closed

Thanks for reporting this issue. This issue was created over 4 years ago and hasn't seen an update in 1 year. We are closing this in an effort to keep a realistic backlog. Please open up a new issue that includes a link to this issue if you feel this still needs to be addressed. We can then triage the new issue and reassess.

#7 Updated by Justin Sherrill about 2 months ago

  • Target version deleted (Katello Backlog)

#8 Updated by Justin Sherrill about 2 months ago

  • Status changed from Closed to Rejected

Also available in: Atom PDF