GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows uploading files to a specific project in GitLab via the GitLab API. It is useful for automating file uploads to projects, such as adding images, documents, or other assets directly to a project's repository or storage. For example, it can be used in CI/CD pipelines or project management workflows to programmatically upload files to a GitLab project.

Use Case Examples

  1. Uploading a project logo or documentation file to a GitLab project automatically after a build process.
  2. Adding user-generated content or assets to a project repository as part of an automated workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication to use, defaulting to GitLab API key authentication.
baseUrl 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, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the project ID for this operation.

Output

JSON

  • id - The ID of the project to which the file is uploaded.
  • url - The URL of the uploaded file in the project.
  • alt - Alternative text or description for the uploaded file.
  • markdown - Markdown formatted link to the uploaded file.

Dependencies

  • GitLab API key credential

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 error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (invalid project ID), and 400 Bad Request (invalid file upload format or parameters).

Links

Discussion