Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/windmill-api/services/JobService.ts>JobService

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
class JobService
import { JobService } from "https://deno.land/x/windmill@v1.421.2/windmill-api/services/JobService.ts";

Static Methods

cancelPersistentQueuedJobs(unnamed 0: { workspace: string; path: string; requestBody: { reason?: string; }; }): CancelablePromise<string>

cancel all queued jobs for persistent script

cancelQueuedJob(unnamed 0: { workspace: string; id: string; requestBody: { reason?: string; }; }): CancelablePromise<string>

cancel queued or running job

cancelSelection(unnamed 0: { workspace: string; requestBody: Array<string>; }): CancelablePromise<Array<string>>

cancel jobs based on the given uuids

cancelSuspendedJobGet(unnamed 0: { workspace: string; id: string; resumeId: number; signature: string; approver?: string; }): CancelablePromise<string>

cancel a job for a suspended flow

cancelSuspendedJobPost(unnamed 0: { workspace: string; id: string; resumeId: number; signature: string; requestBody: any; approver?: string; }): CancelablePromise<string>

cancel a job for a suspended flow

countJobsByTag(unnamed 0: { horizonSecs?: number; workspaceId?: string; }): CancelablePromise<Array<{ tag: string; count: number; }>>

Count jobs by tag

createJobSignature(unnamed 0: { workspace: string; id: string; resumeId: number; approver?: string; }): CancelablePromise<string>

create an HMac signature given a job id and a resume id

deleteCompletedJob(unnamed 0: { workspace: string; id: string; }): CancelablePromise<CompletedJob>

delete completed job (erase content but keep run id)

forceCancelQueuedJob(unnamed 0: { workspace: string; id: string; requestBody: { reason?: string; }; }): CancelablePromise<string>

force cancel queued job

getCompletedCount(unnamed 0: { workspace: string; }): CancelablePromise<{ database_length: number; }>

get completed count

getCompletedJob(unnamed 0: { workspace: string; id: string; }): CancelablePromise<CompletedJob>

get completed job

getCompletedJobResult(unnamed 0: { workspace: string; id: string; suspendedJob?: string; resumeId?: number; secret?: string; approver?: string; }): CancelablePromise<any>

get completed job result

getCompletedJobResultMaybe(unnamed 0: { workspace: string; id: string; getStarted?: boolean; }): CancelablePromise<{ completed: boolean; result: any; success?: boolean; started?: boolean; }>

get completed job result if job is completed

get db clock

getFlowDebugInfo(unnamed 0: { workspace: string; id: string; }): CancelablePromise<any>

get flow debug info

getFlowUserState(unnamed 0: { workspace: string; id: string; key: string; }): CancelablePromise<any>

get flow user state at a given key

getJob(unnamed 0: { workspace: string; id: string; noLogs?: boolean; }): CancelablePromise<Job>

get job

getJobArgs(unnamed 0: { workspace: string; id: string; }): CancelablePromise<any>

get job args

getJobLogs(unnamed 0: { workspace: string; id: string; }): CancelablePromise<string>

get job logs

getJobUpdates(unnamed 0: { workspace: string; id: string; running?: boolean; logOffset?: number; getProgress?: boolean; }): CancelablePromise<{ running?: boolean; completed?: boolean; new_logs?: string; log_offset?: number; mem_peak?: number; progress?: number; flow_status?: WorkflowStatusRecord; }>

get job updates

getLogFileFromStore(unnamed 0: { workspace: string; path: string; }): CancelablePromise<any>

get log file from object store

getQueueCount(unnamed 0: { workspace: string; allWorkspaces?: boolean; }): CancelablePromise<{ database_length: number; suspended?: number; }>

get queue count

getResumeUrls(unnamed 0: { workspace: string; id: string; resumeId: number; approver?: string; }): CancelablePromise<{ approvalPage: string; resume: string; cancel: string; }>

get resume urls given a job_id, resume_id and a nonce to resume a flow

getRootJobId(unnamed 0: { workspace: string; id: string; }): CancelablePromise<string>

get root job id

getSuspendedJobFlow(unnamed 0: { workspace: string; id: string; resumeId: number; signature: string; approver?: string; }): CancelablePromise<{ job: Job; approvers: Array<{ resume_id: number; approver: string; }>; }>

get parent flow job of suspended job

listCompletedJobs(unnamed 0: { workspace: string; orderDesc?: boolean; createdBy?: string; label?: string; parentJob?: string; scriptPathExact?: string; scriptPathStart?: string; schedulePath?: string; scriptHash?: string; startedBefore?: string; startedAfter?: string; success?: boolean; jobKinds?: string; args?: string; result?: string; tag?: string; page?: number; perPage?: number; isSkipped?: boolean; isFlowStep?: boolean; hasNullParent?: boolean; isNotSchedule?: boolean; }): CancelablePromise<Array<CompletedJob>>

list all completed jobs

listExtendedJobs(unnamed 0: { workspace: string; concurrencyKey?: string; rowLimit?: number; createdBy?: string; label?: string; parentJob?: string; scriptPathExact?: string; scriptPathStart?: string; schedulePath?: string; scriptHash?: string; startedBefore?: string; startedAfter?: string; createdOrStartedBefore?: string; running?: boolean; scheduledForBeforeNow?: boolean; createdOrStartedAfter?: string; createdOrStartedAfterCompletedJobs?: string; jobKinds?: string; args?: string; tag?: string; result?: string; page?: number; perPage?: number; isSkipped?: boolean; isFlowStep?: boolean; hasNullParent?: boolean; success?: boolean; allWorkspaces?: boolean; isNotSchedule?: boolean; }): CancelablePromise<ExtendedJobs>

Get intervals of job runtime concurrency

listFilteredUuids(unnamed 0: { workspace: string; orderDesc?: boolean; createdBy?: string; parentJob?: string; scriptPathExact?: string; scriptPathStart?: string; schedulePath?: string; scriptHash?: string; startedBefore?: string; startedAfter?: string; success?: boolean; scheduledForBeforeNow?: boolean; jobKinds?: string; suspended?: boolean; running?: boolean; args?: string; result?: string; tag?: string; page?: number; perPage?: number; concurrencyKey?: string; allWorkspaces?: boolean; isNotSchedule?: boolean; }): CancelablePromise<Array<string>>

get the ids of all jobs matching the given filters

listJobs(unnamed 0: { workspace: string; createdBy?: string; label?: string; parentJob?: string; scriptPathExact?: string; scriptPathStart?: string; schedulePath?: string; scriptHash?: string; startedBefore?: string; startedAfter?: string; createdBefore?: string; createdAfter?: string; createdOrStartedBefore?: string; running?: boolean; scheduledForBeforeNow?: boolean; createdOrStartedAfter?: string; createdOrStartedAfterCompletedJobs?: string; jobKinds?: string; suspended?: boolean; args?: string; tag?: string; result?: string; page?: number; perPage?: number; isSkipped?: boolean; isFlowStep?: boolean; hasNullParent?: boolean; success?: boolean; allWorkspaces?: boolean; isNotSchedule?: boolean; }): CancelablePromise<Array<Job>>

list all jobs

listQueue(unnamed 0: { workspace: string; orderDesc?: boolean; createdBy?: string; parentJob?: string; scriptPathExact?: string; scriptPathStart?: string; schedulePath?: string; scriptHash?: string; startedBefore?: string; startedAfter?: string; success?: boolean; scheduledForBeforeNow?: boolean; jobKinds?: string; suspended?: boolean; running?: boolean; args?: string; result?: string; tag?: string; page?: number; perPage?: number; allWorkspaces?: boolean; isNotSchedule?: boolean; }): CancelablePromise<Array<QueuedJob>>

list all queued jobs

openaiSyncFlowByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; includeHeader?: string; queueLimit?: string; jobId?: string; }): CancelablePromise<any>

run flow by path and wait until completion in openai format

openaiSyncScriptByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; parentJob?: string; jobId?: string; includeHeader?: string; queueLimit?: string; }): CancelablePromise<any>

run script by path in openai format

restartFlowAtStep(unnamed 0: { workspace: string; id: string; stepId: string; branchOrIterationN: number; requestBody: ScriptArgs; scheduledFor?: string; scheduledInSecs?: number; parentJob?: string; tag?: string; jobId?: string; includeHeader?: string; invisibleToOwner?: boolean; }): CancelablePromise<string>

restart a completed flow at a given step

resultById(unnamed 0: { workspace: string; flowJobId: string; nodeId: string; }): CancelablePromise<any>

get job result by id

resumeSuspendedFlowAsOwner(unnamed 0: { workspace: string; id: string; requestBody: any; }): CancelablePromise<string>

resume a job for a suspended flow as an owner

resumeSuspendedJobGet(unnamed 0: { workspace: string; id: string; resumeId: number; signature: string; payload?: string; approver?: string; }): CancelablePromise<string>

resume a job for a suspended flow

resumeSuspendedJobPost(unnamed 0: { workspace: string; id: string; resumeId: number; signature: string; requestBody: any; approver?: string; }): CancelablePromise<string>

resume a job for a suspended flow

runCodeWorkflowTask(unnamed 0: { workspace: string; jobId: string; entrypoint: string; requestBody: WorkflowTask; }): CancelablePromise<string>

run code-workflow task

runFlowByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; scheduledFor?: string; scheduledInSecs?: number; skipPreprocessor?: boolean; parentJob?: string; tag?: string; jobId?: string; includeHeader?: string; invisibleToOwner?: boolean; }): CancelablePromise<string>

run flow by path

runFlowPreview(unnamed 0: { workspace: string; requestBody: FlowPreview; includeHeader?: string; invisibleToOwner?: boolean; jobId?: string; }): CancelablePromise<string>

run flow preview

runRawScriptDependencies(unnamed 0: { workspace: string; requestBody: { raw_scripts: Array<RawScriptForDependencies>; entrypoint: string; }; }): CancelablePromise<{ lock: string; }>

run a one-off dependencies job

runScriptByHash(unnamed 0: { workspace: string; hash: string; requestBody: any; scheduledFor?: string; scheduledInSecs?: number; skipPreprocessor?: boolean; parentJob?: string; tag?: string; cacheTtl?: string; jobId?: string; includeHeader?: string; invisibleToOwner?: boolean; }): CancelablePromise<string>

run script by hash

runScriptByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; scheduledFor?: string; scheduledInSecs?: number; skipPreprocessor?: boolean; parentJob?: string; tag?: string; cacheTtl?: string; jobId?: string; invisibleToOwner?: boolean; }): CancelablePromise<string>

run script by path

runScriptPreview(unnamed 0: { workspace: string; requestBody: Preview; includeHeader?: string; invisibleToOwner?: boolean; jobId?: string; }): CancelablePromise<string>

run script preview

runWaitResultFlowByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; includeHeader?: string; queueLimit?: string; jobId?: string; }): CancelablePromise<any>

run flow by path and wait until completion

runWaitResultScriptByPath(unnamed 0: { workspace: string; path: string; requestBody: ScriptArgs; parentJob?: string; tag?: string; cacheTtl?: string; jobId?: string; includeHeader?: string; queueLimit?: string; }): CancelablePromise<any>

run script by path

runWaitResultScriptByPathGet(unnamed 0: { workspace: string; path: string; parentJob?: string; tag?: string; cacheTtl?: string; jobId?: string; includeHeader?: string; queueLimit?: string; payload?: string; }): CancelablePromise<any>

run script by path with get

setFlowUserState(unnamed 0: { workspace: string; id: string; key: string; requestBody: any; }): CancelablePromise<string>

set flow user state at a given key