GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to retrieve information about npm packages using the API v4 endpoint. It is useful for scenarios where you need to fetch details about specific npm packages hosted on GitLab, such as package metadata or version information. For example, it can be used in automation workflows to monitor package updates or validate package existence.

Use Case Examples

  1. Fetch details of an npm package named 'mypackage' from GitLab's npm registry.
  2. Use the node to automate package metadata retrieval for CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, typically a GitLab API key credential. This is hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to which the API requests are sent. Defaults to https://gitlab.com.
Method The HTTP method used for the API request. Defaults to GET.
Query Parameters Collection of query parameters for the API request, including the required 'package_name' parameter specifying the npm package name to retrieve.

Output

JSON

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

Dependencies

  • Requires a GitLab API key credential for authentication unless Skip Authentication is enabled.

Troubleshooting

  • Ensure the 'package_name' query parameter is provided and correctly spelled; missing or incorrect package names will cause API errors.
  • If authentication is enabled, verify that the GitLab API key credential is valid and has sufficient permissions to access the npm package registry.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.

Links

Discussion