Is it possible to generate bootdisk iso host files using the api or curl directly?
We would like to mount isos using the rest api to HP ilo interfaces using their rest api, but it is a bit unclear how to achieve it the foreman bit.
If I try using curl https://host/bootdisk/disks/host using my name/password, I get redirected to the login page. I would expect to get the iso file.
Thanks in advance.
Yes, it should be possible. If you look at https://yourforeman/apidoc, you should find API endpoints below /bootdisk/api.
Yes, it should be possible. If you look at https://yourforeman/apidoc,
you should find API endpoints below /bootdisk/api.
Thanks for the tip! Indeed I see documentation there (I did not know this,
nice), And it works indeed:
$ curl https://foremantest00.sub.domain.tld/bootdisk/api/hosts/47 -u
username --output /tmp/kk.iso
Enter host password for user ‘username’:
% Total % Received % Xferd Average Speed Time Time Time
Dload Upload Total Spent Left
100 1024k 0 1024k 0 0 1224k 0 --:–:-- --:–:-- --:–:--
]$ file /tmp/kk.iso
/tmp/kk.iso: DOS/MBR boot sector; partition 1 : ID=0x17, active, start-CHS
(0x0,0,1), end-CHS (0x0,63,32), startsector 0, 2048 sectors
Very nice. Thanks again.