GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific secure file from a GitLab project using the GitLab API v4. It is useful for automating the process of accessing secure files stored within GitLab projects, such as certificates, keys, or other sensitive files that need to be programmatically accessed or managed.

Use Case Examples

  1. Automate downloading a secure file from a GitLab project for deployment purposes.
  2. Integrate secure file retrieval into a CI/CD pipeline to use certificates or keys securely stored in GitLab.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Path Parameters The path parameters required for the API endpoint, including the project ID and the secure file ID.

Output

JSON

  • id - The ID of the secure file retrieved.
  • name - The name of the secure file.
  • size - The size of the secure file in bytes.
  • created_at - The timestamp when the secure file was created.
  • updated_at - The timestamp when the secure file was last updated.
  • file_type - The type of the secure file.
  • project_id - The ID of the project to which the secure file belongs.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and secure file ID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to access secure files in the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (invalid or missing API key), 404 Not Found (incorrect project or secure file ID), and 403 Forbidden (insufficient permissions).

Links

Discussion