GitLab API

GitlabTool

Actions1000

Overview

This node operation authorizes a PyPI package for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/packages/pypi/authorize`. It is useful for automating package authorization workflows in CI/CD pipelines or project management tasks within GitLab.

Use Case Examples

  1. Automate PyPI package authorization for a project during deployment.
  2. Integrate GitLab PyPI package authorization into a custom DevOps workflow.

Properties

Name Meaning
Skip Authentication If set to true, the node skips the authentication step for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Path parameters for the API request, specifically the project ID or URL-encoded path required to identify the project for which the PyPI package authorization is requested.

Output

JSON

  • statusCode - HTTP status code of the API response
  • body - Response body containing the authorization details or error information from the GitLab API

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided API credentials.
  • If authentication is skipped, the request may fail due to lack of authorization.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (invalid or missing API token) and 404 Not Found (incorrect project ID or insufficient permissions).

Links

Discussion