GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a Debian package source file from a GitLab project using the SHA256 hash of the file. It is useful for users who need to access specific Debian package sources stored in GitLab repositories, particularly when verifying or downloading package files by their hash for security or integrity purposes.

Use Case Examples

  1. A developer wants to download a specific Debian package source file from a GitLab project by providing the project ID, distribution codename, component, and the SHA256 hash of the file.
  2. A DevOps engineer verifies the integrity of Debian packages in a CI/CD pipeline by fetching the package source file using its SHA256 hash from GitLab.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request. Defaults to false, meaning authentication is used.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, defaulting to GET. Options include GET, POST, PUT, DELETE, HEAD, PATCH.
Query Parameters - Distribution The Debian Codename or Suite to specify the distribution of the package source file.
Path Parameters - Id The ID or URL-encoded path of the GitLab project containing the Debian package source file.
Path Parameters - Component The Debian Component (e.g., main) of the package source file.
Path Parameters - File_sha256 The SHA256 hash of the Debian package source file to retrieve.

Output

JSON

  • id - The project ID or path used in the request
  • distribution - The Debian distribution codename or suite specified in the query
  • component - The Debian component specified in the path
  • file_sha256 - The SHA256 hash of the file requested
  • package_source_file - The retrieved Debian package source file data

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and path parameters are correctly URL-encoded and valid to avoid 404 Not Found errors.
  • Verify that the SHA256 hash provided matches an existing file in the specified project and distribution to prevent empty or error responses.
  • If authentication is enabled, ensure the GitLab API key credential is valid and has sufficient permissions to access the project and package data.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct and reachable.

Links

Discussion