GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation interacts with the GitLab API to render a project badge image based on specified parameters. It is useful for dynamically generating badge images for GitLab projects, which can be embedded in documentation or project pages to display status or other information visually. For example, it can be used to render a badge showing build status or coverage percentage for a specific project.

Use Case Examples

  1. Rendering a badge image for a GitLab project by providing the project ID, badge link URL, and badge image URL.
  2. Using the node to dynamically generate badges for multiple projects in an automated workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API 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 API request, default is GET.
Query Parameters Collection of query parameters for the API request, including the badge link URL and badge image URL.
Path Parameters Collection of path parameters for the API request, including the project ID.

Output

Binary

The node outputs the rendered badge image in binary format, suitable for direct use or embedding.

JSON

  • statusCode - HTTP response status code indicating the result of the API request.
  • headers - HTTP response headers returned by the API.
  • data - The binary data of the rendered badge image.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the link_url and image_url query parameters are valid URLs and properly encoded.
  • If authentication is skipped, ensure the API endpoint allows unauthenticated access, otherwise the request will fail.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (invalid project ID or badge parameters), and 400 Bad Request (missing required parameters).

Links

Discussion