GitLab API icon

GitLab API

Gitlab

Actions1062

Alert_management → putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId

AI-generated

Summary

Update a metric image for a specific alert within a GitLab project using its project ID, alert IID, and metric image ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the alert.
  • alert_iid (required) — The internal ID (IID) of the alert within the project to update.
  • metric_image_id (required) — The ID of the metric image associated with the alert to be updated.
  • url — Optional new URL linking to more information about the metric image.
  • url_text — Optional descriptive text for the metric image or the URL provided.
  • skipAuthentication — If set to true, skips authentication for the request; otherwise uses GitLab API credentials.

Output shape

a JSON object representing the updated metric image of the alert as returned by the GitLab API

Requires authentication unless 'Skip Authentication' is enabled. The operation updates the metric image resource by HTTP PUT to the path /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}, returning the updated resource's details.

Examples

Example 1: Update a metric image's URL and description for a given alert in a GitLab project

Specify the project ID, alert IID, and metric image ID, then provide new 'url' and 'url_text' values for update.

Links

Discussion