---
title: "run script preview"
method: POST
path: "/w/{workspace}/jobs/run/preview"
tags: ["job"]
---

# run script preview

`POST /w/{workspace}/jobs/run/preview`

## Path parameters

- `workspace` string, required

## Query parameters

- `include_header` string
- `invisible_to_owner` boolean
- `timeout` integer
- `job_id` string, uuid

## Request body

- Preview
  - `content` string — The code to run
  - `path` string — The path to the script
  - `script_hash` string — The hash of the script
  - `args` ScriptArgs, required — The arguments to pass to the script or flow
  - `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'
  - `tag` string
  - `kind` 'code' | 'identity' | 'http'
  - `dedicated_worker` boolean
  - `lock` string
  - `flow_path` string
  - `modules` object, nullable — Additional script modules keyed by relative file path
  - `temp_script_refs` object, nullable — Map of relative-import script path -> temp storage hash so the preview job resolves those imports from not-yet-deployed local content instead of the deployed script

## Response `201`

job created

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
