GH-200 - Consume and troubleshoot workflows (18% of the exam) - Section 2.4

Locate, download and manage workflow logs and artifacts through the user interface and the REST API.

Locate and download workflow logs and artifacts via the GitHub UI and the REST API. Manage artifact retention periods and understand the default expiry policy.

download artifactsworkflow logsREST APIartifact retention

Practice question for this objective

Free sampleConsume and troubleshoot workflowsmedium

An automation script lists a workflow run's artifacts over REST, obtains an artifact identifier, and now needs to fetch the artifact's actual contents as a zip file for further processing. The script already holds the owner, repository and artifact identifier. Which REST API request downloads the artifact content?

GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/<format>
  • ASend GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip, because that endpoint redirects to a short-lived URL that serves the artifact's contents as a downloadable zip file. Correct
  • BSend GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id} on its own, because requesting an artifact by identifier without a format returns its binary contents directly as a zip in the response body.
  • CSend POST /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip, because creating a download request with POST is required before GitHub will package the artifact into a zip for retrieval.
  • DSend GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts/zip, because the run-scoped artifacts path bundles every artifact for the run into one combined zip download.
Download an artifact's contents over REST by calling the artifact endpoint with the zip archive format, which redirects to a temporary download. The Download an artifact endpoint, GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip, returns a redirect to a short-lived URL that serves the artifact packaged as a zip, so it delivers the contents the script must process. Requesting the artifact by identifier without the format yields JSON metadata, POST is not a valid method for this download, and there is no run-scoped combined-zip endpoint of that form.

Why A is correct: The download artifact endpoint with the zip archive format responds with a redirect to a temporary URL that streams the artifact as a zip, which is exactly what the script needs for processing.

Why B is wrong: Tempting because this path identifies the artifact, but without the archive format it returns JSON metadata such as size and expiry, not the artifact's downloadable contents.

Why C is wrong: Tempting because some downloads use a two-step request, but artifact retrieval is a single GET and POST is not accepted here, so this request fails rather than returning the zip.

Why D is wrong: Tempting because it mixes real path segments, but no such combined run-level zip endpoint exists, and the script holds an artifact identifier rather than a run identifier anyway.

See more GH-200 practice questions, answers explained.

Exam traps in Consume and troubleshoot workflows

Answers that look right on this material and are not. Each one is a distractor from a different question in the GH-200 bank for this domain.

  • Artifacts stay downloadable from the run summary page indefinitely after their retention period, because GitHub keeps expired artifacts in cold storage for later audit retrieval.

    Why it is wrong: Tempting because audit retention sounds plausible, but expired artifacts are deleted outright and are not preserved in any cold storage for later download.

  • GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs, which returns the run's per-step log lines bundled as a downloadable zip alongside the metadata for each job in that run.

    Why it is wrong: Tempting because this endpoint is run-scoped and lists jobs, but it returns JSON job metadata only and produces no log zip, so it meets neither of the stated needs.

  • Call GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs, because that endpoint streams the concatenated step logs of every job in the run as one downloadable zip archive.

    Why it is wrong: Tempting because this endpoint does enumerate the run's jobs, but it returns JSON metadata about each job, not a log archive, so it cannot be saved as the zip of run logs the engineer wants.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.