GitLab API

GitlabTool

Actions1000

Overview

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

Use Case Examples

  1. Automating file upload authorization for a GitLab project before uploading assets.
  2. Integrating GitLab project upload authorization into a custom deployment script.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID for this operation.

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 created.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and accessible with the provided authentication.
  • If authentication is skipped, the request may fail due to lack of permissions.
  • Verify the base URL is correct for the GitLab instance being accessed.
  • Common error messages include 401 Unauthorized (authentication issues) and 404 Not Found (invalid project ID).

Links

Discussion