GitLab API

GitlabTool

Actions905

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 GitLab projects, such as adding images, documents, or other assets programmatically within workflows.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID for this operation.

Output

JSON

  • id - The unique identifier of the uploaded file.
  • alt - Alternative text for the uploaded file.
  • url - The URL where the uploaded file can be accessed.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID path parameter is correctly set and corresponds to an existing project in GitLab.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to upload files to the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common errors include authentication failures, invalid project ID, or file upload size limits imposed by GitLab.

Links

Discussion