GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to retrieve information about PyPi packages for a specific project using the API endpoint `/api/v4/projects/{id}/packages/pypi/simple/*package_name`. It is useful for automating the retrieval of package details from GitLab projects, especially in CI/CD pipelines or package management workflows.

Use Case Examples

  1. Fetch details of a PyPi package named 'my.pypi.package' from a GitLab project with a specific project ID.
  2. Automate package version checks or metadata retrieval for PyPi packages hosted in GitLab projects.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, 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 (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Collection of query parameters for the API request, specifically the PyPi package name to query.
Path Parameters Collection of path parameters for the API request, specifically the project ID or URL-encoded path.

Output

JSON

  • response - The JSON response from the GitLab API containing details about the specified PyPi package.

Dependencies

  • Requires GitLab API key credential for authentication unless skipping authentication.

Troubleshooting

  • Ensure the project ID and package name are correctly specified and URL-encoded if necessary.
  • If authentication is enabled, verify that the GitLab API key credential is valid and has sufficient permissions.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common errors include 404 Not Found if the project or package does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion