List the artifacts attached to a build or a specific job, then download an artifact's contents via the REST API's redirect-based download endpoint.

domain: buildkite.com/docs · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Authenticate with `Authorization: Bearer $TOKEN`. List/get/download require scope `read_artifacts`; deleting requires `write_artifacts`. See https://buildkite.com/docs/apis/rest-api/artifacts
  2. List artifacts for a whole build (all jobs): `GET https://api.buildkite.com/v2/organizations/{org.slug}/pipelines/{pipeline.slug}/builds/{build.number}/artifacts` — this route needs the build **number** (e.g. `3`), not the build UUID. Optional query params: `state` (`new`|`error`|`finished`|`deleted`|`expired`, else `422`) and `path` (exact match or glob with `*`).
  3. List artifacts for one job: `GET https://api.buildkite.com/v2/organizations/{org.slug}/jobs/{job.id}/artifacts`, or the build-scoped equivalent `GET .../pipelines/{pipeline.slug}/builds/{build.number}/jobs/{job.id}/artifacts`.
  4. Get a single artifact's metadata: `GET .../jobs/{job.id}/artifacts/{id}` (or the build-scoped path). Each artifact record includes a `download_url` you can call directly.
  5. Download: `GET .../jobs/{job.id}/artifacts/{id}/download` (or the build-scoped variant). Responds `302 Found`; the pre-signed storage URL is returned BOTH in the JSON body as `{"url": "..."}` and in the `Location` header — follow the redirect (e.g. `curl -L`) or fetch that URL immediately.
  6. Delete an artifact record: `DELETE .../jobs/{job.id}/artifacts/{id}` (or build-scoped) — scope `write_artifacts`, returns `204 No Content`.
  7. Docs used: https://buildkite.com/docs/apis/rest-api/artifacts

Known gotchas

Related routes

Trigger a dbt Cloud job run via the REST API and download run artifacts on completion
docs.getdbt.com · 5 steps · unrated
List and download build artifacts for a CircleCI job via the API v2
circleci.com · 5 steps · unrated
Download GitLab CI job artifacts via the REST API — by job ID, by the latest successful pipeline for a ref, as a single extracted file, and manage their retention.
docs.gitlab.com · 8 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans