Unable to delete a Rundeck Job via webAPI

Viewed 28

I am unable to delete a rundeck job using API. The error message is below

{"error":true,"apiversion":38,"errorCode":"api.error.job.delete.failed","message":"Job could not be deleted: Cannot delete Job \"Junk_Extract\" [22d05f6a-c9e4-4388-863-668b7f8db411]: it may have been modified or executed by another user"}

The command I have used:

curl --location --request DELETE 'https://localhost:4443/api/38/job/22d05f6a-c9e4-4388-8a63-668b7f8db411' --header 'Accept: application/json' --header 'X-Rundeck-Auth-Token: 7kotazOO3xRr43qeZl3CQnYcKwzU6' -k

How can I delete a rundeck job?

1 Answers

You need to disable the execution/schedule first, under admin rights:

  1. Disable executions for that jobs using this endpoint.
  2. Disable the schedule for that job using this endpoint.
  3. Then delete it using this endpoint.
Related