GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves packages associated with a specific GitLab project using the GitLab API v4. It is useful for users who want to list or filter packages within a project, such as developers managing project dependencies or DevOps engineers monitoring package versions and statuses. For example, it can be used to fetch all npm packages for a project or to get packages filtered by creation date or status.

Use Case Examples

  1. Fetch all packages for a project with ID '123'.
  2. Retrieve npm packages for a project, sorted by creation date in ascending order.
  3. Get packages with a specific version or name within a project.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the parameters for the API request including path and query parameters such as project ID, pagination, sorting, filtering by package type, name, version, and status.
Query Parameters Collection of optional query parameters to filter and paginate the package list, including page number, items per page, order, sort direction, package type, name, version, inclusion of versionless packages, and status.
Path Parameters Collection of path parameters, specifically the project ID or URL-encoded path identifying the project.

Output

JSON

  • id - The unique identifier of the package.
  • name - The name of the package.
  • version - The version of the package.
  • type - The type of the package (e.g., npm, maven).
  • status - The status of the package (e.g., default, hidden, processing).
  • created_at - The creation date of the package.
  • other_properties - Additional package details returned by the GitLab API.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided authentication.
  • Verify that the base URL is correct and points to a valid GitLab instance.
  • Check that the authentication credentials are valid and have sufficient permissions to access project packages.
  • If pagination parameters are used, ensure they are within valid ranges to avoid empty or partial results.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (invalid project ID), and 400 Bad Request (invalid query parameters). Resolving these involves correcting credentials, project ID, or query parameters respectively.

Links

Discussion