v106

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-03812347972.4 KB
script

create script

Creates a new script when the path does not already exist. Creates a new version of an existing script when called with the same path and the current parent_hash.

post/w/{workspace}/scripts/create

Path parameters

workspacestring required

Request body

pathstring required
parent_hashstring
auto_parentboolean

When true, the backend resolves the parent to the current deployed head for this path within the transaction (ignoring parent_hash), instead of failing with a "lineage must be linear" error when the supplied parent_hash is stale.

summarystring required
descriptionstring
contentstring required
schemaobject
is_templateboolean
lockstring
language'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb' | 'bunnative' | 'dbt' required
kind'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'
tagstring
envsstring[]
concurrent_limitinteger
concurrency_time_window_sinteger
cache_ttlnumber
cache_ignore_s3_pathboolean
dedicated_workerboolean
ws_error_handler_mutedboolean
priorityinteger
restart_unless_cancelledboolean
timeoutinteger
delete_after_secsinteger

If set, delete the job's args, result and logs after this many seconds following job completion

deployment_messagestring
concurrency_keystring
debounce_keystring
debounce_delay_sinteger
debounce_args_to_accumulatestring[]
max_total_debouncing_timeinteger
max_total_debounces_amountinteger
visible_to_runner_onlyboolean
auto_kindstring
codebasestring
has_preprocessorboolean
on_behalf_of_emailstring
on_behalf_ofstring

Authorization identity to run as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. Supply this or on_behalf_of_email; when only the address is given it is resolved to the account it names, and an address naming nobody is rejected. A pair that disagrees is rejected.

preserve_on_behalf_ofboolean

When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email / on_behalf_of pair instead of overwriting it with the caller's own identity.

modulesobject nullable

Additional script modules keyed by relative file path

labelsstring[]
skip_draft_deletionboolean

When true (set by the CLI / git sync), deploying this script does not delete an existing user draft at the same path.

Response

script created