http_trigger

create many HTTP triggers

Changed on
post/w/{workspace}/http_triggers/create_many

Request

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

Path parameters

workspacestring required

Request body

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 triggered

route_pathstring required

The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /.

workspaced_routeboolean

If true, the route includes the workspace ID in the path

summarystring nullable

Short summary describing the purpose of this trigger

descriptionstring nullable

Detailed description of what this trigger does

is_flowboolean required

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

http_method'get' | 'post' | 'put' | 'delete' | 'patch' required
authentication_resource_pathstring nullable

Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods)

is_asyncboolean

Deprecated, use request_type instead

request_type'sync' | 'async' | 'sync_sse'
authentication_method'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature' required
is_static_websiteboolean required

If true, serves static files from S3/storage instead of running a script

wrap_bodyboolean

If true, wraps the request body in a 'body' parameter

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

job trigger mode

raw_stringboolean

If true, passes the request body as a raw string instead of parsing as JSON

allowed_originsstring[] nullable

Origins allowed to call this route cross-origin, matched against the request's Origin header (ignoring case) and echoed back on a match. When set, the list governs both the preflight and the response, overriding any Access-Control-Allow-Origin the runnable returns via wm_headers. Use ['*'] to opt out of any restriction, including the http_route_default_allowed_origins instance setting. An empty list is not a configuration and resolves exactly as null does. When null, the instance setting applies, or Access-Control-Allow-Origin: * if it is unset. Ignored on a static website, which has no authentication of its own and so hands out public files: restricting which browsers may read them protects nothing while breaking cross-origin webfonts and fetches. A single-file static asset is not exempt, since it can carry an authentication_method.

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

http trigger created

Changes