GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a Composer package archive from a specific GitLab project using the GitLab API. It is useful for automating the download or inspection of Composer package archives stored in GitLab projects, especially in CI/CD pipelines or package management workflows.

Use Case Examples

  1. Fetch a Composer package archive by specifying the project ID, package name, and SHA checksum to verify the package version.
  2. Automate retrieval of Composer package archives for dependency management in PHP projects hosted on GitLab.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request.
Query Parameters Query parameters for the API request, including the SHA checksum and Composer package name.
Path Parameters Path parameters for the API request, including the project ID.

Output

JSON

  • id - The ID or URL-encoded path of the GitLab project.
  • sha - The SHA checksum of the Composer package archive.
  • package_name - The name of the Composer package.
  • archive_url - The URL or data of the retrieved Composer package archive.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and package name are correctly URL-encoded to avoid 404 errors.
  • Verify the SHA checksum matches the package version to prevent retrieval errors.
  • Check that the GitLab API token has sufficient permissions to access the project and packages.
  • If skipping authentication, ensure the GitLab instance allows anonymous access to the package archives.

Discussion