GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves information about a specific npm package within a GitLab group using the GitLab API v4. It is useful for developers or DevOps engineers who want to programmatically access package details stored in a GitLab group's npm registry. For example, it can be used to automate package version checks or integrate package metadata retrieval into CI/CD pipelines.

Use Case Examples

  1. Fetch details of an npm package named 'mypackage' in a GitLab group with ID '12345' to verify its version before deployment.
  2. Automate monitoring of npm packages in a GitLab group to trigger alerts if a package is updated.

Properties

Name Meaning
Skip Authentication Option to bypass 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, default is GET.
Parameter Schema Defines the required path and query parameters for the API call, including the group ID and package name.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path API endpoint path template for accessing the npm package in the group.
Query Parameters Collection of query parameters, specifically the package_name to identify the npm package.
Path Parameters Collection of path parameters, specifically the group ID to identify the GitLab group.

Output

JSON

  • id - Unique identifier of the npm package in the group
  • name - Name of the npm package
  • version - 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
  • metadata - Additional metadata related to the npm package

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and package name are correctly URL-encoded to avoid 404 errors.
  • If authentication is skipped, the API request may fail due to lack of permissions; verify credentials if access is denied.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.

Links

Discussion