GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the distribution tags of a specific npm package within a GitLab group using the GitLab API. It is useful for developers or DevOps engineers who want to programmatically access metadata about npm packages hosted in GitLab groups, such as checking available version tags for deployment or automation purposes.

Use Case Examples

  1. Fetch the dist-tags of an npm package named 'my-package' in a GitLab group with ID '12345' to verify the latest version tags before deployment.
  2. Automate the retrieval of npm package tags to integrate with CI/CD pipelines for version management.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET.
Query Parameters Query parameters for the API request, specifically the npm package name to retrieve dist-tags for.
Path Parameters Path parameters for the API request, specifically the group ID or URL-encoded path.

Output

JSON

  • dist-tags - The distribution tags of the npm package, indicating version tags such as 'latest' or other custom tags.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID and package name are correctly URL-encoded and valid to avoid 404 errors.
  • If authentication is enabled, verify that the GitLab API key credential is correctly configured and has sufficient permissions to access the group and package.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct.

Links

Discussion