Cancel task with API
-
Hi
Admitting few things :
- Server ip : 10.0.0.1
- One multicast session
- Need to cancel one client task belonging to the mutlicast group
- Task id for the client : 3001
Runnning the following command should kill the client task or I’am wrong :
curl -s -L -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001/[cancel|remove|delete]
Whatever the option I choose (cancel, remove or delete), this API resquest result in a json which is the same as the one I get requesting task info :
curl -s -L -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001
Anybody can tell me what I’m doing wrong ?
I use this document as fog API support : https://news.fogproject.org/simplified-api-documentation/Thanks in advance for any help.
Proc.
-
@processor Can you provide example?
If you use cancel|remove|delete, the type shoudl be a DELETE request, you’re currently (from what I can see) doing a get request.
curl -X "DELETE" -sL -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001 # OR # curl -X "DELETE" -sL -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001/cancel # OR # curl -X "DELETE" -sL -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001/remove # OR # curl -X "DELETE" -sL -H "fog-user-token: [token]" -H "fog-api-token: [token]" http://10.0.0.1/fog/task/3001/delete
-
Thanks Tom !!
Sorry for this POST I feel so ashamed by this noob mistake.
So it’s solved!
-
@processor Don’t feel ashamed. Mistakes happen and that’s what we are all here for.
The example I was asking for was the output, but then it all clicked. You were doing a Get request