GitLab API icon

GitLab API

Gitlab

Actions917

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 or analysis.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the request, default is GET.
Query Parameters Query parameters for the request, including package_version (required) and optional path for file directory.
Path Parameters Path parameters for the request, including project id, package_name, and file_name.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID, package name, package version, and file name are correctly specified to avoid 404 Not Found errors.
  • Verify that the GitLab API key credential has sufficient permissions to access the project and packages.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the correct API endpoint is targeted.

Links

Discussion