openapi: 3.0.3 info: title: Windmill Apps Scripts API description: 'Windmill is an open-source developer platform that turns scripts into internal tools, UIs, workflows, and cron jobs, executed by a distributed worker fleet. This is a representative subset of the Windmill REST API - the same surface used by the Windmill CLI and web UI. The authoritative, machine-generated specification is served live at GET /openapi.yaml (see https://app.windmill.dev/openapi.html); this document curates the most commonly used, stable endpoints for discovery. Almost every resource is scoped under a workspace at the /w/{workspace} path prefix. Windmill runs as Windmill Cloud (base https://app.windmill.dev/api) or self-hosted (base http(s)://your-host/api). Requests are authenticated with a Bearer token created in the Windmill UI under account settings, or with a session cookie.' version: 1.745.0 contact: name: Windmill url: https://www.windmill.dev license: name: AGPL-3.0 (community) / Windmill Enterprise License url: https://github.com/windmill-labs/windmill/blob/main/LICENSE servers: - url: https://app.windmill.dev/api description: Windmill Cloud - url: http://localhost:8000/api description: Local development (self-hosted) security: - bearerAuth: [] - cookieAuth: [] tags: - name: Scripts description: Code runnables in Python, TypeScript, Go, Bash, SQL, and more. paths: /w/{workspace}/scripts/list: parameters: - $ref: '#/components/parameters/Workspace' get: operationId: listScripts tags: - Scripts summary: List scripts description: Lists scripts in a workspace, most recent version per path. responses: '200': description: A list of scripts. content: application/json: schema: type: array items: $ref: '#/components/schemas/Script' '401': $ref: '#/components/responses/Unauthorized' /w/{workspace}/scripts/create: parameters: - $ref: '#/components/parameters/Workspace' post: operationId: createScript tags: - Scripts summary: Create a script description: Creates a new script (or a new version of an existing path). requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptInput' responses: '201': description: The created script hash. content: application/json: schema: type: string '401': $ref: '#/components/responses/Unauthorized' /w/{workspace}/scripts/get/p/{path}: parameters: - $ref: '#/components/parameters/Workspace' - $ref: '#/components/parameters/Path' get: operationId: getScriptByPath tags: - Scripts summary: Get a script by path description: Retrieves the latest version of a script at the given path. responses: '200': description: The requested script. content: application/json: schema: $ref: '#/components/schemas/Script' '404': $ref: '#/components/responses/NotFound' /w/{workspace}/scripts/archive/p/{path}: parameters: - $ref: '#/components/parameters/Workspace' - $ref: '#/components/parameters/Path' post: operationId: archiveScriptByPath tags: - Scripts summary: Archive a script description: Archives the script at the given path. responses: '200': description: Archive confirmation. '404': $ref: '#/components/responses/NotFound' components: parameters: Path: name: path in: path required: true description: The runnable/resource path (e.g. u/username/my_script or f/folder/name). schema: type: string Workspace: name: workspace in: path required: true description: The workspace id (tenant) the resource belongs to. schema: type: string responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid Bearer token or session cookie. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Script: type: object properties: hash: type: string path: type: string summary: type: string description: type: string content: type: string language: type: string enum: - python3 - deno - bun - go - bash - powershell - postgresql - mysql - bigquery - snowflake - graphql - nativets - php schema: type: object additionalProperties: true created_at: type: string format: date-time ScriptInput: type: object required: - path - content - language properties: path: type: string summary: type: string description: type: string content: type: string language: type: string schema: type: object additionalProperties: true Error: type: object properties: error: type: object properties: name: type: string message: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: 'Bearer token created in the Windmill UI under account settings, passed as Authorization: Bearer YOUR_TOKEN.' cookieAuth: type: apiKey in: cookie name: token description: Session cookie set by the Windmill web UI after login.