Hello everyone, hope you’re having a good day.
I’ve been trying to build an API call that would suspend and then autoresume a job but I’m not being able to figure out how. These have been my attempts so far:
1.
curl -s -L -k -X POST "${URL}/Job/30409890/action/pause?autoResumeInSec=60" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authtoken: $key" \
-H "Content-Length: 0" \
--data '{}' > /dev/null
2.
curl -s -L -k -X POST "${URL}/Job/$jobid/action/pause" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authtoken: $key" \
--data '{
"options": {
"autoResumeInSec": 600
}
}' > /dev/null
Request 1. will suspend but never end up resuming. I’m basically stuck first suspending and putting it in a loop finding when the job is finally suspended to then make a call to resume. If I was able to use the autoresume parameter it would really simplify things.
Has anyone made this work? We’re on version 11.36 in case that is relevant.
Thank you in advance for your help.