Discards an agent's held runs
Name every held run with all, or some with taskIds from the held-runs list. A discarded run cannot be released again. The answer carries how many runs were discarded.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The unique identifier of the agent.
The tenant identifier
All held runs, or the ones named by task id.
Every held run of the agent. Either this or HeldRunSelection.TaskIds, not both.
The held runs to act on, by task id (as the held-runs list gives them).
items <= 500Release only the newest run of each piece of work: of a trigger's runs with the same release key (the same pull request, say), the older ones are superseded and never run. Ignored by a discard.
Response Body
curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/heldRuns:discard" \ -H "Content-Type: application/json" \ -d '{}'{
"discarded": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Lists an agent's held runs, oldest first.
Each row names the limit that refused the run, where it came from (a trigger or a channel message), when it was held and when the hold lapses, and whether a release was already asked for. Runs that share a release key are the same piece of work, such as one pull request or one conversation; releasing with newestPerKey runs only the newest of them. Use a row's taskId to release or discard that run alone.
Runs an agent's held runs again
The limits are checked first: when the agent would be refused again (for example its weekly cap still binds after the daily one was raised) nothing is released and the answer is 409 with the reason. The answer carries how many runs were queued, how many still wait, and their estimated cost at the agent's average per run over the last 7 days (null with fewer than 5 runs).