API questions
-
Hello there,
I’m trying to figure out how to work with the API. From a past post, I copied this curl command to try and deploy an image onto a machine. The end goal is to try and be able to automate this on Jenkins.
curl -k -H 'Content-Type: application/json' -H 'fog-user-token: (user token)' -H 'fog-api-token: (api token)' http://(the parts before the .com).com/fog/host/(name of host)/task -d '{"taskTypeID":1,"shutdown": true}'
I tried running this on a machine not on the fog server machine or with the fog client installed in command line. Nothing returned and the job wasn’t scheduled.
I then tried running this on the linux machine with the fog server installed and it either returns nothing with the job wasn’t scheduled or the error,
“error”: “Invalid tasking type passed”.What mistake am I making here that’s not letting things pass through?
Any help is greatly appreciated and I can provide more information whenever I can.