Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: "Uploading Content to the Satellite Server" has multiple issues in commands
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: DocumentationAssignee: Akshay Gadhave <agadhave>
Status: CLOSED DUPLICATE QA Contact: SAT-DOCS <sat-bz-docs-list>
Severity: high Docs Contact:
Priority: medium    
Version: 6.10.3CC: mdolezel, mgokhool
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-01 20:47:12 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:
Bug Depends On: 2068454    
Bug Blocks:    

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 ***