GitLab API

GitlabTool

Actions1000

Overview

This node operation updates a specific badge in a GitLab project using the GitLab API. It is useful for managing project badges programmatically, such as changing badge details or updating badge configurations. For example, a user can update the badge's link or image URL for a project badge identified by its badge ID and project ID.

Use Case Examples

  1. Updating a badge's link URL in a GitLab project.
  2. Changing the image URL of a project badge.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to PUT for this operation.
Path Parameters Parameters for the API path, including the project ID and badge ID to identify the badge to update.

Output

JSON

  • id - The ID of the updated badge.
  • link_url - The URL the badge links to.
  • image_url - The URL of the badge image.
  • name - The name of the badge.
  • created_at - Timestamp when the badge was created.
  • updated_at - Timestamp when the badge was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and badge ID are correct and accessible by the authenticated user.
  • Verify that the API key has sufficient permissions to update project badges.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common errors include 401 Unauthorized (authentication issues), 404 Not Found (invalid project or badge ID), and 400 Bad Request (invalid request body).

Links

Discussion