GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to create a Composer package for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/packages/composer`. It is useful for automating package management workflows within GitLab projects, such as publishing Composer packages programmatically.

Use Case Examples

  1. Automatically publish a new Composer package version to a GitLab project when code is pushed.
  2. Integrate Composer package creation into CI/CD pipelines to streamline dependency management.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically a GitLab API key credential.
baseUrl The base URL of the GitLab instance to which the request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the request; for this operation, it is POST.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path identifying the GitLab project.

Output

JSON

  • response - The JSON response from the GitLab API after creating the Composer package, typically including package details and status.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to create packages in the project.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct.
  • Common errors include 401 Unauthorized (invalid or missing credentials), 404 Not Found (invalid project ID), and 400 Bad Request (invalid request body).

Links

Discussion