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