GitLab API

GitlabTool

Actions905

Overview

This node operation authorizes access to a specific Conan package file in a GitLab repository using the GitLab API. It is useful for managing and securing access to Conan package files stored in GitLab, particularly in CI/CD pipelines or automated workflows where package file authorization is required before download or further processing.

Use Case Examples

  1. Authorize access to a Conan package file named 'conaninfo.txt' for a specific package version and user in a GitLab project.
  2. Automate the authorization process for Conan package files in a GitLab repository to integrate with build and deployment pipelines.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Parameter Schema Defines the required path parameters for the API call, including package name, version, username, channel, recipe revision, Conan package reference, package revision, and file name.
Request Body Schema Schema for the request body, if applicable, currently set to null.
Request Path The API endpoint path template used for the authorization request, with placeholders for path parameters.
Path Parameters Collection of path parameters required to specify the exact Conan package file to authorize, including package name, version, username, channel, recipe revision, Conan package reference, package revision, and file name.

Output

JSON

  • statusCode - HTTP status code returned by the API call indicating success or failure.
  • body - Response body containing authorization details or error information.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure all required path parameters are correctly provided; missing or incorrect parameters will cause API errors.
  • Verify that the GitLab API credentials are valid and have sufficient permissions to authorize package files.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct.
  • Common error messages include 401 Unauthorized (invalid credentials), 404 Not Found (incorrect package details), and 400 Bad Request (invalid parameters). Resolving these involves correcting credentials, verifying package details, and ensuring parameter formats are correct.

Links

Discussion