API Help
-
I am trying to do something fairly simple with the API and that is just to find the host that I am currently on and start the image that is already associated with it.
I have the API stuff done and that works, and I can pull information from stealing other people’s work, but I can’t figure out the simple start a task with the image assigned to it.
Thanks!
-
I figured this out. Nevermind!
-
I figured out my question now. I have it to where it will create a host within fog via the API. The only thing I can’t figure out is how to make that host be associated with a SnapinID. For instance, I want it to be associated with a SnapinID of 1. How can I do that?
-
@chris-whiteley said in API Help:
The only thing I can’t figure out is how to make that host be associated with a SnapinID. For instance, I want it to be associated with a SnapinID of 1. How can I do that?
While I haven’t tested lately I would think you should be able to create a snapin association like this:
curl -X PUT -d '{"snapins":[1]}' http://x.x.x.x/fog/host/33/edit
Assuming the host you want to associate the snapin (ID 1) to has host ID 33. Don’t forget the API tokens in the call.