Call to Api
#1053
Replies: 1 comment 3 replies
-
iPXE has support for script files. Just make sure that what the server returns is a valid iPXE script. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm trying to make an API call to my server to determine whether to boot from the disk or the network after a server has had Windows installed and it reboots.
I envision something like the code below (I will handle the platform later with another conditional). I tried using chain to make the call; but it shows "Ok" stops there. I also tried imgfetch, but I can't see the response. Although I can save the response to a file, I can't handle its content. As a workaround, I thought about sending a response code of 200 or 401 and using it in a conditional, and that works, but I'm unsure if the error is with the call or if the server isn't installed (see the example below).
Lastly, I can imagine making the API call from my DHCP server and returning different boot.ipxe files, but I haven't found any information on how to do that yet. Also i don't know if there is a solution in ipxe like the abortpxe.com in gpxe
This is what I envision:
I tried this, and it works if I send a 200 or 401 response, but I can't differentiate between "not installed" and a "call error":
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions