GitLab API

GitlabTool

Actions1095

Projects → getApiV4ProjectsIdEvents

AI-generated

Summary

Retrieve events for a specified GitLab project, optionally filtered by action, target type, date range, and sorted order.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to fetch events from.
  • action — Filter events by a specific event action.
  • target_type — Filter events by the type of event target, e.g. issue, milestone, merge_request, note, project, snippet, user, wiki, or design.
  • before — Include only events created before this date (YYYY-MM-DD format).
  • after — Include only events created after this date (YYYY-MM-DD format).
  • sort — Sort events in ascending ('asc') or descending ('desc') order, default is 'desc'.
  • page — Page number for paginated results, defaults to 1.
  • per_page — Number of events returned per page, default is 20.

Output shape

a JSON array of event objects associated with the specified GitLab project

Results are paginated based on 'page' and 'per_page' parameters; events can be filtered and sorted. Requires authentication unless 'Skip Authentication' is enabled.

Examples

Example 1: Fetch latest 20 events for project with ID '12345' sorted descending (default).

Set 'id' to '12345'. Leave other query parameters empty or default.

Example 2: Fetch events related to merge requests after 2023-01-01, limited to 10 per page.

Set 'id' to project ID, 'target_type' to 'merge_request', 'after' to '2023-01-01', and 'per_page' to 10.

Links

Discussion