I am looking into the tasks api. I have found the listing api using curl /_tasks?detailed=true&actions=*search&pretty" and I can successfully cancel one or all.
I would like to implement a [Cancel] button in my application for users who are bored waiting for a long query. How can I tag a query with a unique ID so I know which task to cancel when the user presses that cancel button.