GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to retrieve information about a specific npm package within a GitLab group. It is useful for scenarios where you need to programmatically access npm package details stored in a GitLab group's package registry, such as automation scripts for package management or integration workflows involving GitLab packages.

Use Case Examples

  1. Retrieve details of an npm package named 'mypackage' in a GitLab group identified by its ID or URL-encoded path.
  2. Automate monitoring or auditing of npm packages within GitLab groups by fetching package metadata.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the API request, defaulting to GET.
Query Parameters Query parameters for the API request, specifically the npm package name to retrieve.
Path Parameters Path parameters for the API request, specifically the group ID or URL-encoded path.

Output

JSON

  • id - The ID of the npm package in the GitLab group.
  • name - The name of the npm package.
  • version - The version of the npm package.
  • created_at - Timestamp when the package was created.
  • updated_at - Timestamp when the package was last updated.
  • package_type - Type of the package, e.g., npm.
  • project_id - ID of the project associated with the package.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID or URL-encoded path and package name are correctly provided; missing or incorrect values will cause API errors.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access group packages.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (incorrect group ID or package name), and 400 Bad Request (invalid parameters). Resolving these involves correcting credentials, parameters, or URL.

Links

Discussion