Reputation: 11
We are using the admin apis to create the schedule, which is working fine and getting scheduled. Similarly we would like to delete the task using admin API. But we either need the task ID or the task node to delete the task. But I looked around in the api i could not find a way to retrieve the task id. do we have an api to get the scheduled task id or we just have to use the task node to delete the task.
Upvotes: 0
Views: 94
Reputation: 20414
With older versions of MarkLogic, your best bet would be admin:group-get-scheduled-tasks(). Iterate through them till you find the one you are looking for. After that you can either take the task-id from the XML, and use that, or pass through the entire task XML for deletion.
HTH!
Upvotes: 1
Reputation: 7770
You are probably looking for: DELETE /manage/v2/tasks/{id|name}
Please note that even though the description says: "This resource address deletes the named task from the named group.", it actually works by name or ID.
Upvotes: 1