GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves metadata for a specific NuGet package version from a GitLab project using the GitLab API. It is useful for scenarios where you need to fetch detailed information about a NuGet package hosted within a GitLab project, such as version details, dependencies, or other metadata. For example, it can be used in CI/CD pipelines to verify package versions or in automation workflows to gather package information for reporting or deployment.

Use Case Examples

  1. Fetching metadata for a NuGet package version '1.0.0' named 'MyNuGetPkg' in a GitLab project identified by its ID.
  2. Automating the retrieval of package metadata to validate package versions before deployment.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent. Defaults to https://gitlab.com.
Method The HTTP method used for the API request. Defaults to GET.
Query Parameters Parameters sent as query strings in the API request to specify the NuGet package name and version.
Path Parameters Parameters sent as part of the URL path to specify the GitLab project ID.

Output

JSON

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

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID, package name, and package version are correctly specified and URL-encoded if necessary.
  • Verify that the GitLab API authentication token is valid and has sufficient permissions to access the project and package metadata.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • If skipping authentication, ensure the API endpoint is 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