GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific file from a generic package stored in a GitLab project using the GitLab API v4. It is useful for accessing package files by specifying the project ID, package name, package version, optional file path, and file name. Practical applications include automating the download of package files for CI/CD pipelines, software distribution, or package management workflows.

Use Case Examples

  1. Download a specific version of a package file from a GitLab project to use in a deployment pipeline.
  2. Fetch a configuration file stored within a package in a GitLab project for automated testing.

Properties

Name Meaning
Skip Authentication If enabled, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters for the request, including package_version (required) and path (optional) to specify the file directory path.
Path Parameters Path parameters required for the request, including id (project ID or URL-encoded path), package_name (name of the package), and file_name (name of the file to retrieve).

Output

JSON

  • fileContent - The content of the requested package file retrieved from the GitLab project.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID, package name, package version, and file name are correctly specified to avoid 404 Not Found errors.
  • Verify that the authentication token has sufficient permissions to access the project and package files.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion