GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation interacts with the GitLab API to query NuGet packages for a specific project using the API endpoint `/api/v4/projects/{id}/packages/nuget/query`. It allows users to search for NuGet packages within a GitLab project by specifying parameters such as the project ID, search term, pagination options (skip and take), and whether to include prerelease versions. This is useful for automating package management tasks, integrating package queries into workflows, or retrieving package information programmatically.

Use Case Examples

  1. Retrieve NuGet packages for a project by project ID and search term.
  2. Paginate through NuGet packages by specifying how many results to skip and take.
  3. Include or exclude prerelease versions in the search results.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used for the request, hidden unless Skip Authentication is false. Defaults to GitLab API authentication.
baseUrl The base URL of the GitLab instance to send requests to. Defaults to https://gitlab.com.
Method The HTTP method to use for the request. Defaults to GET.
Parameter Schema Defines the parameters for the API request including path and query parameters such as project ID, search term, skip, take, and prerelease flags.
Request Body Schema Schema for the request body, if applicable. Null for this operation.
Request Path The API endpoint path template for the request, with a placeholder for the project ID.
Query Parameters Collection of query parameters to customize the search: q (search term), skip (number of results to skip), take (number of results to return), prerelease (include prerelease versions).
Path Parameters Collection of path parameters including the project ID to identify the project for which to query NuGet packages.

Output

JSON

  • id - The unique identifier of the NuGet package.
  • name - The name of the NuGet package.
  • version - The version of the NuGet package.
  • description - Description of the NuGet package.
  • created_at - Timestamp when the package was created.
  • updated_at - Timestamp when the package was last updated.
  • prerelease - Boolean indicating if the package version is a prerelease.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the base URL is correct and reachable, especially if using a self-hosted GitLab instance.
  • Check that the authentication credentials are valid and have sufficient permissions to access the project's packages.
  • If no results are returned, verify the search term and pagination parameters are set correctly.
  • Common error messages may include 401 Unauthorized (authentication issues), 404 Not Found (invalid project ID or endpoint), and 400 Bad Request (invalid query parameters).

Links

Discussion