Getting task id of specific task from hammer CLI?

Currently using Foreman 2.5.4. More of a process question rather than bugfix

I have a script that is kicked off via cron to automatically publish my content views. However, I’m running into an issue where sometimes, those publishing tasks are paused for one reason or another. I’d like to try to programmatically resume these tasks a set number of times before giving up. To resume a task, I can use:
hammer task resume --task-ids <TASK_ID> --organization-id <ORG_ID>

However, it’s not clear to me how I can find the appropriate task ID. I can run “hammer task list --search “paused” --organization-id <ORG_ID>” to get all of the paused tasks. Is there a better way to just get the task ID associated with the publishing task?

Relatedly, is there a document that explains the “–search” parameter? It’s not clear to me what kinds of queries this parameter accepts.

Thank you!

It is the same syntax that you can use in the web ui when searching for tasks. As far as I know there is no proper documentation for this, but the web ui at least gives you autocompletion.

Ah, I see. Thanks for the info!