GitLab API icon

GitLab API

Gitlab

Actions917

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 automating backups, exporting project code snapshots, or integrating repository data into other workflows.

Use Case Examples

  1. Download a tar.gz archive of the main branch of a GitLab project by specifying the project ID and format.
  2. Retrieve a specific commit's repository archive by providing the commit SHA.
  3. Download only 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 (boolean). Defaults to false.
Authentication Authentication method used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for the request including commit SHA, archive format, subfolder path, and whether to include LFS blobs.
Path Parameters Path parameters for the request, specifically the project ID or URL-encoded path.

Output

JSON

  • data - The archive data of the project's repository returned from the GitLab API.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the authentication credentials are valid and have sufficient permissions to access the project repository.
  • Check that the specified commit SHA exists in the project to avoid errors when downloading the archive.
  • If the archive format is unsupported or incorrectly specified, the request may fail.

Links

Discussion