GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdJobsArtifactsRefNameRaw*artifactPath

AI-generated

Summary

Retrieve a specific file from a job artifact archive in a GitLab project by specifying the project ID or path, branch/tag name, job name, and the file path inside the artifact.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project from which to retrieve the artifact file.
  • ref_name (required) — The branch or tag name in the repository. Note that HEAD or SHA references are not supported.
  • job (required) — The name of the job that produced the artifact containing the target file.
  • artifact_path (required) — The path to the specific file inside the job artifacts archive to retrieve.
  • job_token — Optional job token for use with multi-project pipeline triggers; available only for Premium and Ultimate GitLab tiers.
  • baseUrl — Base URL for the GitLab instance; defaults to https://gitlab.com if not specified.
  • method — HTTP method to use, with GET as the default.
  • skipAuthentication — Optionally skip authentication for the request.

Output shape

a raw binary file representing the specified file retrieved from the job artifacts archive

Returns the raw file content located at the specified artifact_path inside the specified job artifacts for the given project and ref_name. The file is fetched directly via the GitLab API's raw artifact path endpoint. If the file or parameters are invalid, an error response will be returned.

Links

Discussion