FruxonDocs
AgentsExecution Records

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.

POST
/v1/tenants/{tenant}/agents/{agent}/heldRuns:discard
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The unique identifier of the agent.

tenant*string

The tenant identifier

All held runs, or the ones named by task id.

all?boolean

Every held run of the agent. Either this or HeldRunSelection.TaskIds, not both.

taskIds?|null

The held runs to act on, by task id (as the held-runs list gives them).

Itemsitems <= 500
newestPerKey?boolean

Release 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.

[key: string]?never

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
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}