GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to upload metric images related to a specific alert in a GitLab project. It is useful for adding visual metric data to alert management in GitLab, enhancing alert context with images or URLs that provide more detailed metric information. For example, users can upload a graph image or provide a URL linking to a detailed metric dashboard for an alert.

Use Case Examples

  1. Uploading a PNG image file representing CPU usage metrics to an alert in a GitLab project.
  2. Adding a URL with a description that links to an external monitoring dashboard for an alert.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters for the API path including project ID and alert IID.

Output

Binary

The node outputs the uploaded image file as binary data if applicable.

JSON

  • id - The ID of the uploaded metric image.
  • url - The URL to view more metric information.
  • url_text - A description of the image or URL.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and alert IID are correctly specified to avoid 404 errors.
  • Verify that the image file is correctly attached and meets GitLab's file upload requirements.
  • Authentication errors may occur if the API token is missing or invalid; ensure proper credentials are set.

Links

Discussion