Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1256717 - Cannot list non-custom products and repositories from the API
Summary: Cannot list non-custom products and repositories from the API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1338516
TreeView+ depends on / blocked
 
Reported: 2015-08-25 10:32 UTC by Barak Korren
Modified: 2019-09-26 13:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-02 09:56:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Barak Korren 2015-08-25 10:32:54 UTC
Description of problem:
Listing or searching for products in all the product APIs only shows custom products. This is despite the fact that non custom (RedHat) products show up in the UI when using the same account and organization used to access the API.
Also note that if querying the products API while specifying a product id details are returned for a non-custom product the same way they are returned for a custom product.
The above is also true for repositories.

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

How reproducible:
Easily

Steps to Reproduce:
1. Install Satellite
2. Add subscriptions
3. Create some custom products
4. Attempt to list or search products from the API

Actual results:
Only custom products are returned in search results.

Expected results:
All products should return in search results.

Additional info:
This prevents scripts from discovering non-custom products and repositories in order to link them to content views for example.

Comment 2 Brad Buckingham 2016-05-02 17:51:14 UTC
Hi Barak,

Can you confirm the APIs that you were using for the above scenario?

From some testing on Satellite 6.2 Beta, I see the following behavior; however, I want to make sure these are the same APIs you were using:

GET katello/api/v2/organizations/1/products - lists RH and custom products (PASS)

GET katello/api/v2/organizations/1/products?custom=true - lists only custom products (PASS)

GET katello/api/v2/organizations/1/products?custom=false - lists only custom products (FAIL)

Comment 3 Barak Korren 2016-05-04 08:03:52 UTC
Hi, This had been a while ago, and done via NailGun, but as far as I can gather, the API I mostly looked into was this:

https://satellite6-ops.rhev-ci-vms.eng.rdu2.redhat.com/katello/api/v2/products?organization_id=1

(Lists only custom products on 6.1.7 which is what I have atm)

Note that this is typical to how NailGun works, it typically looks at the topmost URL for a given entity type, not the one nested inside other entities (It is hard to write a generic SDK otherwise, because you would need a lot of entity-specific nesting information).

Comment 4 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Bryan Kearney 2016-07-26 15:41:10 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 9 Marek Hulan 2016-12-02 09:56:56 UTC
I verified that it works as expected on 6.2.5 with queries like this

# lists all products
curl https://admin:changeme@sat.example.tst/katello/api/v2/products\?organization_id\=1

# list redhat only
curl https://admin:changeme@sat.example.tst/katello/api/v2/products\?organization_id\=1\&search\='not custom'

# list custom only
curl https://admin:changeme@sat.example.tst/katello/api/v2/products\?organization_id\=1\&search\='custom'

Barak it would be great if you could verify, please let us know if you still experience any issues in 6.2.


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