GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves specific NuGet package details from a GitLab project using the GitLab API. It is useful for developers or DevOps engineers who need to fetch metadata or information about a particular NuGet package version within a GitLab project. For example, it can be used to verify package versions, automate package management, or integrate package data into CI/CD pipelines.

Use Case Examples

  1. Fetch details of a NuGet package named 'mynugetpkg' with version '1.3.0.17' from a GitLab project identified by its project ID.
  2. Automate retrieval of NuGet package metadata for auditing or reporting purposes within a GitLab-hosted project.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the required parameters for the API call, including project ID, package name, and package version.
Request Path The API endpoint path template used to fetch the NuGet package details, with placeholders for project ID, package name, and version.
Query Parameters Collection of query parameters specifying the NuGet package name and version to retrieve.
Path Parameters Collection of path parameters specifying the project ID from which to fetch the NuGet package.

Output

JSON

  • package_id - The unique identifier of the NuGet package.
  • package_name - The name of the NuGet package.
  • package_version - The version of the NuGet package.
  • metadata - Additional metadata about the NuGet package, such as description, authors, and dependencies.
  • download_url - URL to download the NuGet package.
  • created_at - Timestamp when the package was created.
  • updated_at - Timestamp when the package was last updated.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID, package name, and package version are correctly specified and URL-encoded if necessary.
  • Verify that the GitLab API token or authentication credentials have sufficient permissions to access the project's packages.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the package or project does not exist, and 401 Unauthorized if authentication fails. Verify credentials and permissions to resolve these errors.

Links

Discussion