Create a trigger
Changed onCreates a trigger for a Function visible on the branch. The required type discriminator selects the trigger-specific configuration. The supported types are schedule and storage_object_created. A schedule trigger uses a numeric five-field cron expression interpreted in UTC. A storage-object-created trigger fires only after a successful upload to one exact bucket and may narrow matches to an object-key prefix.
The name must be unique among triggers visible on the branch, including inherited triggers.
Note: This endpoint is currently in Beta.
Request
- Base URL: https://console.neon.tech/api/v2
- URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/triggers
- Auth: one of:
- HTTP bearer
- API key in cookie zenith
- API key in cookie keycloak_token
Request body
Example request
{
"schedule": {
"cron": "0 9 * * 1-5"
}
}Response
Trigger created
Example response
{
"trigger": {
"schedule": {
"cron": "0 9 * * 1-5"
}
}
}Changes
- ▲
added to the
response propertyoneOflist for the response status - ▲
removed the required property
/////from the response with the status - ○
added
storage_object_createdmapping keys to the request discriminator - ○
added to the request body
oneOflist - ○
added
storage_object_createddiscriminator mapping keys to theresponse property for the response status
- ▲
- ○
endpoint added
- ○