GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves metadata for a specific NuGet package within a GitLab project using the GitLab API. It is useful for developers or DevOps engineers who need to access package details programmatically, such as version information or package metadata, directly from a GitLab-hosted NuGet repository. For example, it can be used in CI/CD pipelines to verify package versions or to automate package management tasks.

Use Case Examples

  1. Fetch metadata for a NuGet package named 'MyNuGetPkg' in a project with ID '12345' to check its version and dependencies before deployment.
  2. Automate retrieval of NuGet package metadata to integrate with other tools or dashboards for monitoring package usage.

Properties

Name Meaning
Skip Authentication Option to bypass authentication for the request, useful for public projects or testing.
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 HTTP method to use for the request, default is GET.
Parameter Schema Defines required parameters for the API call, including project ID and NuGet package name.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path API endpoint path template for retrieving NuGet package metadata.
Query Parameters Collection of query parameters, specifically the NuGet package name to query.
Path Parameters Collection of path parameters, specifically the project ID or URL-encoded path.

Output

JSON

  • metadata - The metadata information of the specified NuGet package retrieved from the GitLab API.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and package name are correctly specified and URL-encoded if necessary.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access the project and package metadata.
  • If skipping authentication, confirm that the project and package metadata are publicly accessible.
  • Common error messages may include 404 Not Found if the project or package does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion