Triggers
Create trigger
Changed onCreate a trigger from a preset and return it with its signing secret.
post/api/triggers
Request
- Base URL: https://instance-name-be.glean.com
- URL: https://instance-name-be.glean.com/api/triggers
- Auth: HTTP bearer
Request body
Example request
{
"preset_id": "GITHUB_1",
"inputs": {
"repository": "{repository}"
},
"delivery": {
"webhook_url": "https://example.com/webhook"
}
}Response
Trigger created.
Example response
{
"trigger": {
"trigger_id": "trigger_test_123",
"preset_id": "GITHUB_1",
"description": "Reviews I am tagged on, sent to my team's review channel",
"status": "ENABLED",
"inputs": {
"repository": "acme/payments-api"
},
"delivery": {
"webhook_url": "https://customer.app/webhook",
"auth": {
"secret": "secret_test_123"
}
},
"signing_secret": "whsec_xxx"
}
}Changes
- breaking
added the pattern
^https://to the request property/ - info
the
//////response's property pattern^https://was added for the status - info
the
//response's property pattern^whsec_[A-Za-z0-9+/=]+$was added for the status
- breaking
- info
endpoint added
- info