Skip to content
Software capabilities

GitLab capability

Download GitLab CI job artifacts

Use the Job Artifacts API to retrieve outputs from a specific job. Use the GitLab interface when you want to browse the archive or download one file.

Documentation reviewed

Ways to do it

API

GET /projects/{id}/jobs/{job_id}/artifacts

Download the artifact archive produced by a specific CI job.

Requirements
Project ID or URL-encoded path, numeric job ID, and access to that job’s artifacts.
Limitations
On GitLab.com the request can redirect to a CDN. The client must follow redirects.
Read source: GitLab Job Artifacts API archive download

Interface

Build → Artifacts → Browse

Open the project’s artifact listing and browse a job’s archive or download it.

Requirements
Project access and permission to download that job’s artifacts.
Limitations
Download availability depends on the job’s artifact expiration settings and retention rules.
Read source: GitLab CI job artifacts

CLI

glab job artifact <ref> <job-name>

Download the named job’s artifacts from the most recent successful pipeline on a ref.

Requirements
glab authenticated for the project, plus the ref and job name.
Limitations
This command resolves the latest successful pipeline. Use the Jobs API with a numeric job ID for an exact historical run.
Read source: GitLab CLI job artifact