Trigger
Create trigger
Create a trigger for a given pipeline definition. Currently only supported for pipeline definitions where config_source.provider is github_oauth, github_app, github_server, or schedule. Share feedback about our Project Administration APIs.
post/projects/{project_id}/pipeline-definitions/{pipeline_definition_id}/triggers
Path parameters
project_idstring required
An opaque identifier of a project.
pipeline_definition_idstring required
An opaque identifier of a pipeline definition.
Request body
Example request
{
"event_source": {
"provider": "github_app",
"repo": {
"external_id": "some-repo-id"
},
"webhook": {
"sender": "some-webhook-sender"
},
"schedule": {
"cron_expression": "*/5 * * * *",
"attribution_actor": "current"
}
},
"event_preset": "all-pushes",
"checkout_ref": "some-checkout-ref",
"config_ref": "some-config-ref",
"event_name": "some-event-name",
"parameters": {
"deploy_env": "staging"
}
}Response
Successful response.
Example response
{
"event_name": "some event name",
"event_source": {
"provider": "github_app",
"repo": {
"full_name": "some-org/some-repo-name",
"external_id": "some-repo-id"
},
"webhook": {
"url": "https://some-webhook.invalid/some-endpoint?secret=some-secret",
"sender": "datadog"
},
"schedule": {
"cron_expression": "*/5 * * * *"
}
},
"event_preset": "all-pushes",
"checkout_ref": "some-checkout-ref",
"config_ref": "some-config-ref",
"parameters": {
"deploy_env": "staging"
}
}