GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsIdHooksHookIdTestTrigger

AI-generated

Summary

Trigger a test event for a specific project hook within GitLab to verify the hook's functionality for a given trigger type.

Inputs

  • id (required) — The ID of the project containing the hook to test.
  • hook_id (required) — The ID of the hook to be triggered.
  • trigger (required) — The type of trigger event for the hook to test. Must be one of: confidential_issues_events, confidential_note_events, deployment_events, emoji_events, feature_flag_events, issues_events, job_events, merge_requests_events, note_events, pipeline_events, push_events, releases_events, resource_access_token_events, tag_push_events, wiki_page_events, vulnerability_events.
  • Skip Authentication — Optional boolean to bypass authentication (default: false).
  • baseUrl — Optional base URL for the GitLab instance; defaults to https://gitlab.com.

Output shape

a single HTTP response indicating success or failure of the test trigger request

The operation sends a POST request to /api/v4/projects/{id}/hooks/{hook_id}/test/{trigger} and does not return a data payload beyond the HTTP response status. Authentication is required unless explicitly skipped. The trigger value must match one of the predefined event types supported by GitLab.

Links

Discussion