postgres_trigger

create postgres trigger

post/w/{workspace}/postgres_triggers/create

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/w/{workspace}/postgres_triggers/create
  • Auth: one of:
    • HTTP bearer
    • API key in cookie token

Path parameters

workspacestring required

Request body

replication_slot_namestring

Name of the PostgreSQL logical replication slot to use

publication_namestring

Name of the PostgreSQL publication to subscribe to for change data capture

pathstring required

The unique Windmill path for this trigger. Must be of the form u/<user>/<path> or f/<folder>/<path>. This is the trigger object path, not the HTTP route path.

script_pathstring required

Path to the script or flow to execute when database changes are detected

is_flowboolean required

True if script_path points to a flow, false if it points to a script

mode'enabled' | 'disabled' | 'suspended'

job trigger mode

postgres_resource_pathstring required

Path to the PostgreSQL resource containing connection configuration

error_handler_pathstring

Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.

error_handler_argsScriptArgs

The arguments to pass to the script or flow

retryRetry (unresolved $ref)
permissioned_asstring

The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.

preserve_permissioned_asboolean

When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.

labelsstring[]

Response

postgres trigger created

Changes

No recorded changes to this operation across all 296 revisions of this API.