GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a new badge for a specific group in GitLab by making a POST request to the GitLab API endpoint `/api/v4/groups/{id}/badges`. It is useful for automating badge management within GitLab groups, such as adding custom badges to highlight achievements or statuses for group projects.

Use Case Examples

  1. Automatically add a badge to a GitLab group when a new project milestone is reached.
  2. Create badges for GitLab groups as part of a CI/CD pipeline to reflect build or test statuses.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method HTTP method for the API request, default is GET but POST is used for this operation.
Path Parameters Parameters to specify the group ID or URL-encoded path for which the badge is created.

Output

JSON

  • id - The unique identifier of the created badge.
  • name - The name of the badge.
  • image_url - URL of the badge image.
  • link_url - URL the badge links to.
  • group_id - The ID of the group to which the badge belongs.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the request body contains all required fields as per the GitLab API specification for creating badges.
  • Check that the base URL is correctly set to the GitLab instance you are targeting.
  • Authentication errors may occur if the API key is missing, invalid, or lacks sufficient permissions.

Links

Discussion