Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1437201 - attributes selection in query ignored for some collections
attributes selection in query ignored for some collections
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API (Show other bugs)
5.8.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.9.0
Assigned To: Jillian Tullo
Martin Kourim
api:rest
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-29 14:00 EDT by Martin Kourim
Modified: 2018-03-01 08:11 EST (History)
6 users (show)

See Also:
Fixed In Version: 5.9.0.5
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-01 08:11:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 13:37:12 EST

  None (edit)
Description Martin Kourim 2017-03-29 14:00:05 EDT
Description of problem:
Selection of attributes to return is ignored in case of "results", "service_catalogs", "automate", "categories" and "roles" collections.

For /api/<collection>?expand=resources&attributes=id query, these attributes are returned in addition to "href" and "id":
- "result_set" for "results" collection
- "service_templates" for "service_catalogs" collection
- "fqname" for "automate" collection
- "name" for "categories" collection
- "features" for "roles" collection


Version-Release number of selected component (if applicable):
5.8.0.7


How reproducible:
Very


Steps to Reproduce:
1. for collection in "service_catalogs", "automate", "categories", "roles" do
   GET /api/<collection>?expand=resources&attributes=id


Actual results:
Attributes other than id and href are returned


Expected results:
Just id and href attributes are returned
Comment 2 Jillian Tullo 2017-04-12 09:13:08 EDT
PR: https://github.com/ManageIQ/manageiq/pull/14734
Comment 3 Martin Kourim 2017-10-23 10:29:27 EDT
It's now failing on all collections due to https://github.com/ManageIQ/manageiq/issues/15754
Comment 4 Jillian Tullo 2017-10-25 15:05:36 EDT
PR https://github.com/ManageIQ/manageiq-api/pull/144
Comment 5 Martin Kourim 2017-11-08 04:39:22 EST
In case of automate collection the "fqname" attribute is still returned in addition to "href" and "id" when
GET /api/automate?expand=resources&attributes=id
Comment 6 Jillian Tullo 2017-11-08 15:28:52 EST
Hi Martin-

Right now, the reason why fqname is left there is because it is an identifier and is more so the ID than the actual 'id' attribute for the /api/automate case. Let me know if that makes sense.
Comment 7 Martin Kourim 2017-11-08 19:42:51 EST
Thanks for clarification Jillian. Changing status to verified.
Comment 10 errata-xmlrpc 2018-03-01 08:11:02 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0380

Note You need to log in before you can comment on or make changes to this bug.