GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows uploading files to a specific GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/uploads`. It is useful for automating file uploads to projects in GitLab, such as adding images, documents, or other assets programmatically. For example, it can be used in CI/CD pipelines or project management workflows to attach files to projects without manual intervention.

Use Case Examples

  1. Uploading a project logo image to a GitLab project.
  2. Automating the upload of documentation files to a project repository.

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 authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to specify the project ID in the API path.

Output

JSON

  • id - The ID of the uploaded file or resource.
  • url - The URL where the uploaded file can be accessed.
  • alt - Alternative text or description for the uploaded file.
  • markdown - Markdown formatted string to embed the uploaded file in GitLab markdown.

Dependencies

  • Requires GitLab API key credential for authentication.

Troubleshooting

  • Ensure the project ID provided in path parameters is valid and accessible with the authenticated user.
  • Verify that the file to upload meets GitLab's file size and type restrictions.
  • Check that the base URL is correct if using a self-hosted GitLab instance.
  • Authentication errors may occur if the API key is missing or invalid; ensure proper credentials are configured.

Links

Discussion