GitLab API

GitlabTool

Actions905

Overview

This node operation downloads a specific NuGet package from a GitLab project using the GitLab API. It is useful for automating the retrieval of NuGet packages hosted in GitLab projects, enabling integration with CI/CD pipelines or package management workflows. For example, a developer can use this node to programmatically download a particular version of a NuGet package by specifying the project ID, package name, version, and filename.

Use Case Examples

  1. Downloading a NuGet package version 1.3.0.17 named 'mynugetpkg.1.3.0.17.nupkg' from a GitLab project with a specific project ID.
  2. Automating package retrieval in a build pipeline by specifying package details dynamically.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication Authentication method used for the request, hidden unless Skip Authentication is false. Defaults to GitLab API key.
baseUrl Base URL of the GitLab instance. Defaults to https://gitlab.com.
Method HTTP method to use for the request. Defaults to GET.
Query Parameters.package_name The NuGet package name to download.
Query Parameters.package_version The NuGet package version to download.
Query Parameters.package_filename The NuGet package filename to download.
Path Parameters.id The ID or URL-encoded path of the GitLab project containing the package.

Output

Binary

The node outputs the downloaded NuGet package file as binary data, allowing it to be saved or passed to other nodes for further processing.

JSON

  • id - The project ID or URL-encoded path used in the request.
  • package_name - The name of the NuGet package requested.
  • package_version - The version of the NuGet package requested.
  • package_filename - The filename of the NuGet package requested.
  • downloaded_file - The binary content of the downloaded NuGet package file.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and package details (name, version, filename) are correctly specified; incorrect values will cause the download to fail.
  • Authentication errors may occur if the API key is missing, invalid, or lacks sufficient permissions; verify the API key and its scopes.
  • Network issues or incorrect base URL can prevent access to the GitLab instance; confirm the base URL and network connectivity.
  • If the package does not exist or the version/filename is incorrect, the API will return an error; verify package existence and details.

Links

Discussion