/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}Get a triggerReturns the trigger visible on the branch. The supported trigger types are schedule and storage_object_created.
Note: This endpoint is currently in Beta.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
trigger_idstringpathrequiredThe opaque, project-wide trigger ID
Responses
triggerobjectrequiredA branch-effective trigger discriminated by `type`. The supported trigger types are `schedule` and `storage_object_created`.
Show child attributes
oneOf · 2 options
A branch-effective schedule trigger for a Function.
enabledbooleanrequiredfunction_pathstringrequiredPath passed to the target Function.
function_slugstringrequiredThe branch-local Function slug resolved when an occurrence is consumed.
inheritedbooleanrequiredTrue when the effective configuration was authored on an ancestor branch.
namestringrequiredHuman-readable trigger name.
next_run_atnull | stringrequiredNext scheduled occurrence as an RFC 3339 UTC timestamp, or null while disabled or inherited and not explicitly enabled on this branch.
scheduleobjectrequiredA numeric five-field cron schedule interpreted in UTC.
Show child attributes
cronstringrequiredNumeric five-field cron expression (minute through day-of-week), interpreted in UTC.
trigger_idstringrequiredOpaque, server-minted project-wide trigger identifier.
typestringrequiredTrigger type discriminator.
versioninteger · int64requiredMonotonic configuration version.
A branch-effective trigger that invokes a Function after a successful upload matching its exact bucket and optional object-key prefix.
enabledbooleanrequiredfunction_pathstringrequiredPath passed to the target Function.
function_slugstringrequiredThe branch-local Function slug resolved when an invocation is consumed.
inheritedbooleanrequiredTrue when the effective configuration was authored on an ancestor branch.
namestringrequiredHuman-readable trigger name.
storage_object_createdobjectrequiredMatches successful uploads to one exact bucket and, when configured, an object-key prefix. The Function receives a JSON request body with `type` set to `storage_object_created` and a `data` object containing exactly `bucket_name` and `object_key`.
Show child attributes
bucket_namestringrequiredThe exact object-storage bucket name to watch.
prefixstringOptional object-key prefix of at most 1024 UTF-8 bytes. When omitted, every key in the bucket matches. When present, the full object key must start with these exact bytes; matching is case-sensitive and does not normalize paths or require a path-segment boundary. Match-all responses omit this field rather than returning an empty string.
trigger_idstringrequiredOpaque, server-minted project-wide trigger identifier.
typestringrequiredTrigger type discriminator.
versioninteger · int64requiredMonotonic configuration version.
{
"trigger": {
"enabled": true,
"function_path": "string",
"function_slug": "string",
"inherited": true,
"name": "string",
"next_run_at": "string",
"schedule": {
"cron": "0 9 * * 1-5"
},
"trigger_id": "string",
"type": "schedule",
"version": 0
}
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}