GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to retrieve a specific file from a generic package within a project. It is useful for scenarios where you need to programmatically access package files stored in GitLab's package registry, such as downloading a package file for deployment or analysis.

Use Case Examples

  1. Downloading a specific version of a package file from a GitLab project.
  2. Accessing package files stored in a nested directory structure within a GitLab project.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Parameters sent in the query string, including package_version (required) and optional path for file directory path.
Path Parameters Parameters included in the URL path, including id (project ID or URL-encoded path), package_name, and file_name.

Output

JSON

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

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the project ID and package name are correctly URL-encoded to avoid 404 errors.
  • Verify that the package version and file name exist in the specified project to prevent errors.
  • Check authentication credentials if access is denied or unauthorized errors occur.

Links

Discussion