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 1482383 - Page doesn't exist (404) for tailoring file, scap content and policies through API
Summary: Page doesn't exist (404) for tailoring file, scap content and policies throug...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-17 06:50 UTC by Nikhil Kathole
Modified: 2017-08-17 08:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-17 08:38:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nikhil Kathole 2017-08-17 06:50:35 UTC
Description of problem: We were trying to perform feature testing for tailoring file, scap content and compliance policies through API. As per API documentation,

https://$HOST/apidoc/v2.html

To list policies, tailoring files and scap content, GET requests are

GET /api/compliance/policies
GET /api/compliance/tailoring_files
GET /api/compliance/scap_contents

But these all results in 404.

Version-Release number of selected component (if applicable): sat 6.3 snap 11


How reproducible: always


Steps to Reproduce:
1. curl -s -X GET -k -u admin:<password>  'https://$HOST/api/compliance/policies/'
2. curl -s -X GET -k -u admin:<password>  'https://$HOST/api/compliance/tailoring_files'
3. curl -s -X GET -k -u admin:<password>  'https://$HOST/api/compliance/scap_contents'

Actual results:

Results in "The page you were looking for doesn't exist"

Expected results:

Proper Results should be displayed.

Additional info:

Instead of 

curl -s -X GET -k -u admin:<password>  'https://$HOST/api/compliance/policies/'

The GET request for

curl -s -X GET -k -u admin:<password>  'https://$HOST/api/v2/compliance/policies/'

shows the correct result. (similar for scap content and tailoring file)

Comment 1 Nikhil Kathole 2017-08-17 08:38:35 UTC
It was my bad...This works using the header

API -H "Accept: version=2,application/json"

Closing this issue.


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