Bug 1258323 - Bootiso API not working
Summary: Bootiso API not working
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-31 06:01 UTC by Benjamin
Modified: 2019-10-10 10:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-29 10:29:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Benjamin 2015-08-31 06:01:46 UTC
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 06:03:07 UTC
curl -sS -k -u ${USER}:${PASS} https://${SATELLITE_SERVER}/bootdisk/api/hosts/${HOST_ID}

Comment 3 Stefan Meyer 2016-01-29 10:29:35 UTC
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.