GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves badges for a specific project in GitLab using the GitLab API. It is useful for users who want to programmatically access badge information associated with a project, such as build status or coverage badges, which can be displayed in project documentation or dashboards.

Use Case Examples

  1. Fetching all badges for a project by its ID to display on a project overview page.
  2. Filtering badges by name to find a specific badge related to a CI pipeline.

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.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the API request, default is GET.
Query Parameters Optional query parameters to filter or paginate the badges.
Path Parameters Path parameters required for the API endpoint.

Output

JSON

  • id - Unique identifier of the badge.
  • link_url - URL the badge links to.
  • image_url - URL of the badge image.
  • name - Name of the badge.
  • kind - Type of badge (e.g., 'project', 'group').

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access project badges.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • If pagination parameters are used, ensure they are valid integers to avoid request errors.

Links

Discussion