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 2068453 - "Uploading Content to the Satellite Server" has multiple issues in commands
Summary: "Uploading Content to the Satellite Server" has multiple issues in commands
Keywords:
Status: CLOSED DUPLICATE of bug 2060531
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Documentation
Version: 6.10.3
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: Unspecified
Assignee: Akshay Gadhave
QA Contact: SAT-DOCS
URL:
Whiteboard:
Depends On: 2068454
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-25 11:17 UTC by Pavel Moravec
Modified: 2022-04-01 20:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-01 20:47:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SATDOC-715 0 None None None 2022-03-25 11:22:37 UTC

Description Pavel Moravec 2022-03-25 11:17:51 UTC
Document URL: 
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.10/html-single/api_guide/index#sect-API_Guide-Uploading_Content_to_the_Satellite_Server


Section Number and Name: 
5.3. Uploading Content to the Satellite Server


Describe the issue: 
The commands there have several parameters wrong/extra/missing, which makes either command wrong there.


Suggestions for improvement: 
1) In argument

--header "Accept:application/json,version=2"

the ",version=2" is superfluous and makes the request invalid. Please remove it in *all* the three curl commands.


2) In "Create the upload request.", "size" argument is (newly?) mandatory, also per apidoc. So update

--data {}

to

--data "{\"size\": 12345}"

(where 12345 is the content file size in bytes)


3) The same parameter is mandatory in "Upload your content." step also. Please add there curl option:

--data-urlencode size=12345


4) "uploads" argument is wrong:

--data "{\"uploads\":[\"0be156b1-f373-4cad-89d0-924f8f4491d2\"]}"

must be (per apidoc):

--data "{\"uploads\":[{\"id\": \"0be156b1-f373-4cad-89d0-924f8f4491d2\" }]}"

BUT two more parameters the Sat6.10 do require:

--data "{\"uploads\":[{\"id\": \"0be156b1-f373-4cad-89d0-924f8f4491d2\", \"checksum\": \"sha256sum\", \"name\": \"filename\"}]}"



Additional information: 
There is also some other (product) bug (I will refer it once filed) behind the "BUT two more parameters" bit. Please consult with the developer of the other bug if these are really mandatory or not.

Comment 1 Pavel Moravec 2022-03-25 11:19:11 UTC
See related APIdoc / product bug: https://bugzilla.redhat.com/show_bug.cgi?id=2068454

Comment 5 Pavel Moravec 2022-04-01 20:47:12 UTC

*** This bug has been marked as a duplicate of bug 2060531 ***


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