레퍼런스HTTP APIGit Hub work

Rerun a workflow run the platform started

POST
/v1/sessions/{id}/github/workflow-runs/{run_id}/rerun

Reruns a run this platform dispatched, all jobs or only the failed ones (failed_only). A run the platform has no dispatch record of is refused (run_ref_unprovable), and so is one whose workflow and ref the release's current allowlist no longer names (workflow_not_allowed). Leaves a rerun_workflow receipt either way.

Scope: sessions:write (API key or cookie session). Idempotency-Key: ignored.

Authorization

headerAuthorizationBearer <token>

For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.

Scope: sessions:write

Path Parameters

id*string

The session's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
run_id*integer

The GitHub Actions workflow run's id.

Range0 < value <= 9007199254740991

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
failed_only?boolean

Response Body

Rerun requested; the receipt.

application/json
  1. response
receipt_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/github/workflow-runs/1/rerun' \  -H 'Content-Type: application/json' \  -d '{  "failed_only": true}'
Example Response
{  "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}