GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves an archive of a project's repository from GitLab using the GitLab API v4. It is useful for downloading the repository content as an archive file, optionally specifying commit SHA, archive format, subfolder path, and whether to include LFS blobs. Practical applications include backing up project repositories, analyzing repository snapshots, or automating repository downloads for CI/CD pipelines.

Use Case Examples

  1. Download the latest repository archive of a project by specifying the project ID.
  2. Download a specific commit's archive by providing the commit SHA.
  3. Download a subfolder of the repository as an archive by specifying the path parameter.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET.
Parameter Schema Defines the parameters for the API request including project ID, commit SHA, archive format, subfolder path, and LFS blob inclusion.
Query Parameters Collection of optional query parameters for the request such as sha, format, path, and include_lfs_blobs.
Path Parameters Collection of path parameters including the project ID.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • sha - The commit SHA of the archive to be downloaded.
  • format - The archive format (e.g., tar.gz).
  • path - Subfolder of the repository to be downloaded.
  • include_lfs_blobs - Flag indicating whether to include LFS blobs in the archive.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID is correct and accessible with the provided authentication.
  • Verify that the commit SHA exists in the repository if specified.
  • Check that the archive format is supported by GitLab (e.g., tar.gz).
  • If downloading a subfolder, ensure the path exists in the repository.
  • Authentication errors may occur if the API key is missing or invalid.

Links

Discussion