GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation updates a specific metric image associated with an alert in a GitLab project. It is useful for managing alert-related metric images by modifying their URL or description, enabling better tracking and visualization of alert metrics within GitLab projects. For example, users can update the URL to point to a new metric dashboard or change the description to provide clearer context.

Use Case Examples

  1. Updating the URL of a metric image to a new dashboard link.
  2. Changing the description text of a metric image to better describe the metric.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method The HTTP method to use for the request, default is GET but for this operation it is PUT.
Path Parameters Parameters required in the URL path to identify the project, alert, and metric image to update.
Parameter Schema Defines the required and optional parameters for the API call, including project ID, alert IID, metric image ID, and optional URL and description for the metric image.

Output

JSON

  • id - The ID of the updated metric image.
  • url - The URL associated with the metric image.
  • url_text - The description text of the metric image.
  • alert_iid - The internal ID of the alert to which the metric image belongs.
  • project_id - The ID of the project containing the alert.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID, alert IID, and metric image ID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to update alert metric images.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages may include 404 Not Found if the resource IDs are incorrect, or 401 Unauthorized if authentication fails.

Links

Discussion