GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdJobsJobIdArtifacts*artifactPath

AI-generated

Summary

Retrieve a specific file from a job's artifacts archive in a GitLab project by specifying the project ID, job ID, and the file path inside the artifact archive.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • job_id (required) — The ID of the job whose artifact you want to fetch.
  • artifact_path (required) — The path to the file inside the artifacts archive that you want to retrieve.
  • job_token — Optional token used for multi-project pipeline triggers, available on Premium and Ultimate GitLab tiers.
  • method — HTTP method to use for the request; defaults to GET.
  • baseUrl — Base URL for the GitLab instance; defaults to https://gitlab.com.
  • skipAuthentication — Boolean flag to skip authentication if set to true.

Output shape

binary file

Returns the raw file content from the specified path inside the job's artifacts archive. The output is the binary data of the artifact file. Authentication credentials are required unless skipping authentication is enabled.

Examples

Example 1: Download a test report file from a specific job's artifacts in a project

Set 'id' to your project ID, 'job_id' to the job number, and 'artifact_path' to the path of the report file inside the artifact archive.

Links

Discussion