GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to create a Composer package for a specific project in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/projects/{id}/packages/composer`. It is useful for automating package management and deployment workflows within GitLab projects, especially for PHP projects using Composer packages.

Use Case Examples

  1. Automate publishing a new Composer package version to a GitLab project.
  2. Integrate Composer package creation into CI/CD pipelines for PHP projects hosted on GitLab.

Properties

Name Meaning
Skip Authentication Option to skip authentication for 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 to which the API request is sent.
Method HTTP method used for the API request, default is POST for this operation.
Path Parameters Parameters included in the API request path, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The ID of the project for which the Composer package is created.
  • package - Details of the Composer package created in the project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided authentication.
  • Verify that the GitLab API key credential has sufficient permissions to create packages in the specified project.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include authentication failures, permission denied errors, or invalid project ID errors. Resolving these typically involves verifying credentials, permissions, and input parameters.

Links

Discussion