Project

General

Profile

Actions

Bug #8862

closed

The V2 API doesn't handle arrays of id/name of has_many relationships

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

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

According to the API V2 spec, you should be able to pass in an array of id/name hashes when models have a many-to-many or one-to-many relationship:

$ 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

Katello doesn't support this. I think we can get this working relatively easy--just need to fix the setup_has_many_params filter.


Related issues 1 (0 open1 closed)

Related to Katello - Bug #8846: Katello API throws an incorrect error when receiving non-json requestsClosedDavid Davis01/06/2015Actions
Actions #1

Updated by David Davis about 9 years ago

  • Related to Bug #8846: Katello API throws an incorrect error when receiving non-json requests added
Actions #2

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release set to 23
  • Triaged changed from No to Yes
Actions #3

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release changed from 23 to 31
Actions #4

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release deleted (31)
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 Rejected
  • Target version deleted (Katello Backlog)

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

Also available in: Atom PDF