GitLab API

GitlabTool

Actions1000

Overview

This node operation fetches events from the GitLab API v4 endpoint `/api/v4/events`. It allows users to retrieve various types of events related to a user's projects or the GitLab instance, such as issues, merge requests, notes, and more. This is useful for monitoring activity, auditing changes, or integrating event data into workflows.

Use Case Examples

  1. Retrieve all events across a user's projects by setting the 'scope' query parameter to 'all'.
  2. Filter events by specific actions or target types, such as only 'merge_request' events.
  3. Paginate through events using 'page' and 'per_page' parameters to handle large datasets.
  4. Filter events by date using 'before' and 'after' parameters to get events within a specific timeframe.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to send the API request to, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, default is GET.
Query Parameters Collection of optional query parameters to filter and paginate the events returned by the API.

Output

JSON

  • id - Unique identifier of the event.
  • action_name - Name of the action performed in the event.
  • target_type - Type of the target object related to the event.
  • author_id - ID of the user who triggered the event.
  • target_id - ID of the target object related to the event.
  • created_at - Timestamp when the event was created.
  • project_id - ID of the project associated with the event.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to access events.
  • If skipping authentication, verify that the GitLab instance allows unauthenticated access to the events endpoint.
  • Check that the baseUrl is correctly set to the GitLab instance URL.
  • Validate query parameters for correct types and allowed values, especially for 'target_type' and 'sort'.
  • Handle pagination properly by using 'page' and 'per_page' parameters to avoid missing or duplicating events.

Links

  • GitLab Events API Documentation - Official GitLab API documentation for the Events endpoint, detailing available query parameters and response structure.

Discussion