GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → postApiV4ProjectsIdTriggers

AI-generated

Summary

Create a trigger for a specific project in GitLab by sending a POST request to the /api/v4/projects/{id}/triggers endpoint.

Inputs

  • Id (required) — The ID or URL-encoded path of the project to which the trigger will be added.
  • Request Body (required) — The trigger details conforming to the 'postApiV4ProjectsIdTriggers' schema to define the new trigger's properties.

Output shape

a single JSON object representing the created project trigger

The output corresponds to the response of the GitLab API's project trigger creation endpoint and includes the details of the newly created trigger.

Examples

Example 1: Create a trigger for a project with ID 18

Set 'Id' to '18' and include the required trigger properties in the request body.

Links

Discussion