GitLab API

GitlabTool

Actions905

Overview

This node operation authorizes an upload for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/uploads/authorize`. It is useful for scenarios where you need to programmatically authorize file uploads to a GitLab project, such as automating CI/CD pipelines or managing project assets.

Use Case Examples

  1. Automating the authorization of file uploads to a GitLab project before uploading files.
  2. Integrating GitLab project upload authorization into a custom workflow for managing project resources.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is POST.
Path Parameters Path parameters for the request, specifically the project ID to authorize the upload for.

Output

JSON

  • id - The ID of the authorized upload.
  • alt - Alternative text or description for the upload.
  • url - URL to access the authorized upload.
  • created_at - Timestamp when the upload was authorized.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and accessible with the authenticated user.
  • Verify that the GitLab API key credential is correctly configured and has sufficient permissions to authorize uploads.
  • Check the base URL to ensure it points to the correct GitLab instance if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (authentication issues) and 404 Not Found (invalid project ID). Resolving these involves verifying credentials and project existence.

Links

Discussion