Bug 1437201 - attributes selection in query ignored for some collections
Summary: attributes selection in query ignored for some collections
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Jillian Tullo
QA Contact: Martin Kourim
URL:
Whiteboard: api:rest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-29 18:00 UTC by Martin Kourim
Modified: 2018-03-01 13:11 UTC (History)
6 users (show)

Fixed In Version: 5.9.0.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-01 13:11:02 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description Martin Kourim 2017-03-29 18:00:05 UTC
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 13:13:08 UTC
PR: https://github.com/ManageIQ/manageiq/pull/14734

Comment 3 Martin Kourim 2017-10-23 14:29:27 UTC
It's now failing on all collections due to https://github.com/ManageIQ/manageiq/issues/15754

Comment 4 Jillian Tullo 2017-10-25 19:05:36 UTC
PR https://github.com/ManageIQ/manageiq-api/pull/144

Comment 5 Martin Kourim 2017-11-08 09:39:22 UTC
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 20:28:52 UTC
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-09 00:42:51 UTC
Thanks for clarification Jillian. Changing status to verified.

Comment 10 errata-xmlrpc 2018-03-01 13:11:02 UTC
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.