Bug 2077824

Summary: [RFE] API to allow search by object ID on any object
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: APIAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.4CC: apatel, aruzicka, jbhatia, ofedoren, zhunting
Target Milestone: 6.12.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-3.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:33:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2022-04-22 10:47:45 UTC
Description of problem:
TL;DR: ensure https://projects.theforeman.org/issues/33842 is fixed in Satellite.

One particular use case behind: there is no easy way to filter Capsules other than the internal Satellite one (until "id != 1" is supported). Currently offered filter logic offers either search by features (no feature is solely present on every Sat only) or name/url (not ideal for e.g. potential hostname change).


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


How reproducible:
100%


Steps to Reproduce:
1. No way to filter Capsules "all Capsules except for Satellite". E.g.:

curl -L --user admin:somePassword "$(hostname -f)/katello/api/capsules?search=id+%21%3D+1"

doesnt work

Actual results:
1. An attempt to search based on ID fails with:
{
  "error": {"message":"Field 'id' not recognized for searching!","class":"ScopedSearch::QueryNotSupported"}
}


Expected results:
Search by ID is supported.


Additional info:

Comment 4 Gaurav Talreja 2022-10-06 09:23:31 UTC
Oleh, Thanks for confirming, moving this BZ to verified.

Comment 8 errata-xmlrpc 2022-11-16 13:33:46 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 (Important: Satellite 6.12 Release), 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-2022:8506