Feature #4913
closedWe need to allow users to pass associations in
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
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.
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
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.
Updated by Eric Helms over 8 years ago
- translation missing: en.field_release set to 114
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.
Updated by Justin Sherrill over 4 years ago
- Target version deleted (
Katello Backlog)
Updated by Justin Sherrill over 4 years ago
- Status changed from Closed to Rejected