GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to retrieve Composer package archives for a specific project. It is useful for automating the process of fetching Composer package archives by specifying the project ID, package name, and commit SHA. For example, it can be used in CI/CD pipelines or package management workflows to programmatically access Composer package archives stored in GitLab projects.

Use Case Examples

  1. Fetch a Composer package archive for a project by providing the project ID, package name, and SHA to automate package retrieval in a deployment pipeline.
  2. Use the node to integrate GitLab Composer package archives into a custom package management system by querying specific package versions.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Parameter Schema Defines the required parameters for the API request, including project ID, SHA, and package name.
Request Body Schema Schema for the request body, not used for this GET operation.
Request Path The API endpoint path template for fetching Composer package archives by project ID and package name.
Query Parameters Collection of query parameters including 'sha' (commit SHA) and 'package_name' (Composer package name) required for the request.
Path Parameters Collection of path parameters including 'id' which is the project ID or URL-encoded path.

Output

JSON

  • id - The project ID or URL-encoded path used in the request.
  • sha - The SHA checksum of the Composer package version requested.
  • package_name - The name of the Composer package requested.
  • archive - The Composer package archive data retrieved from the GitLab API.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and package name are correctly URL-encoded to avoid 404 errors.
  • Verify that the SHA parameter matches a valid commit SHA for the package version to prevent retrieval failures.
  • Check that the GitLab API key credential has sufficient permissions to access the project's package registry.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to package archives, otherwise requests will fail.

Links

Discussion