GitLab API

GitlabTool

Actions1000

Overview

This node operation allows downloading 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 user can specify the project ID, package name, version, and filename to download the exact NuGet package needed for deployment or testing.

Use Case Examples

  1. Download a NuGet package version 1.3.0.17 named 'mynugetpkg.1.3.0.17.nupkg' from a GitLab project with a specific ID.
  2. Automate fetching of NuGet packages from GitLab for build automation.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request. Defaults to false.
Authentication The authentication method to use for the API request, hidden unless Skip Authentication is false. Defaults to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to connect to. Defaults to https://gitlab.com.
Method The HTTP method to use for the request. Defaults to GET.
Parameter Schema Defines the required parameters for the API call, including project ID, package name, package version, and package filename. These parameters are used to construct the API request path and query.
Request Body Schema Schema for the request body if applicable, null for this operation.
Request Path The API endpoint path template used for the request, including placeholders for project ID, package name, version, and filename.
Query Parameters Collection of query parameters including package_name, package_version, and package_filename to specify the NuGet package details.
Path Parameters Collection of path parameters including the project ID or URL-encoded path.

Output

Binary

The node outputs the downloaded NuGet package file as binary data.

JSON

  • statusCode - The HTTP status code returned by the API request.
  • headers - The HTTP response headers from the API request.
  • body - The content of the downloaded NuGet package file.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correct and accessible with the provided authentication token.
  • Verify that the package name, version, and filename are accurate and exist in the specified project.
  • Check network connectivity and GitLab instance URL correctness.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (incorrect project or package details), and 500 Internal Server Error (server issues). Resolving these involves verifying credentials, parameters, and retrying later if server errors occur.

Links

Discussion