Bug 1258323 - Bootiso API not working
Bootiso API not working
Status: CLOSED NOTABUG
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-31 02:01 EDT by Benjamin
Modified: 2016-01-29 05:31 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-29 05:29:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Benjamin 2015-08-31 02:01:46 EDT
Description of problem:
The bootdisk API calls do not work:
GET /bootdisk/api 	             Boot disks
GET /bootdisk/api/generic 	     Download generic image
GET /bootdisk/api/hosts/:host_id     Download host image

It is working to create a bootdisk for hosts through the webinterface but when the APi is being used no matter which of the call above is used.


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

How reproducible:
#host specific:
curl -sS -k -u ${USER}:${PASS} https://${SATELLITE_SERVER}/bootdisk/api/hosts/:${HOST_ID}
#generic:
curl -sS -k -u ${USER}:${PASS} https://${SATELLITE_SERVER}/bootdisk/api/generic


Actual results:
Error URL unknown

Expected results:
Download the ISO.
Comment 1 Benjamin 2015-08-31 02:03:07 EDT
curl -sS -k -u ${USER}:${PASS} https://${SATELLITE_SERVER}/bootdisk/api/hosts/${HOST_ID}
Comment 3 Stefan Meyer 2016-01-29 05:29:35 EST
It works if you set the content type in the curl command:
-H "Accept: version=2,application/json" -H "Content-Type: application/json"

curl -o bootdisk_generic.iso -sS -k -u ${USER}:${PASS} -H "Accept: version=2,application/json" -H "Content-Type: application/json" https://${SATELLITE_SERVER}/bootdisk/api/generic

curl -o ${HOSTNAME}.iso -sS -k -u ${USER}:${PASS} -H "Accept: version=2,application/json" -H "Content-Type: application/json" https://${SATELLITE_SERVER}/bootdisk/api/hosts/${HOSTNAME}

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