Project

General

Profile

Actions

Feature #4913

closed

We need to allow users to pass associations in

Added by David Davis about 10 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Yes
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

Actions #1

Updated by David Davis about 10 years ago

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

Actions #2

Updated by David Davis about 10 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
Actions #3

Updated by David Davis about 10 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.

Actions #4

Updated by Eric Helms almost 10 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by Eric Helms over 8 years ago

  • translation missing: en.field_release set to 114
Actions #6

Updated by John Mitsch over 4 years 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.

Actions #7

Updated by Justin Sherrill over 4 years ago

  • Target version deleted (Katello Backlog)
Actions #8

Updated by Justin Sherrill over 4 years ago

  • Status changed from Closed to Rejected
Actions

Also available in: Atom PDF