Files
windmill/backend/openapi.yaml
Ruben Fiszel 2e132878e4 first commit
2022-05-05 04:25:58 +02:00

3407 lines
82 KiB
YAML

openapi: "3.0.3"
info:
version: 1.5.0
title: Windmill server API
contact:
name: Windmill contact
email: contact@windmill.dev
url: https://windmill.dev
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
externalDocs:
description: documentation portal
url: https://docs.windmill.dev
servers:
- url: /api
security:
- bearerAuth: []
- cookieAuth: []
paths:
/version:
get:
summary: get backend version
operationId: backendVersion
tags:
- settings
responses:
"200":
description: git version of backend
content:
text/plain:
schema:
type: string
/openapi.yaml:
get:
summary: get openapi yaml spec
operationId: getOpenApiYaml
tags:
- settings
responses:
"200":
description: openapi yaml file content
content:
text/plain:
schema:
type: string
/w/{workspace}/audit/get/{id}:
get:
summary: get audit log (requires admin privilege)
operationId: getAuditLog
tags:
- audit
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/PathId"
responses:
"200":
description: an audit log
content:
application/json:
schema:
$ref: "#/components/schemas/AuditLog"
/w/{workspace}/audit/list:
get:
summary: list audit logs (requires admin privilege)
operationId: listAuditLogs
tags:
- audit
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- $ref: "#/components/parameters/Before"
- $ref: "#/components/parameters/After"
- $ref: "#/components/parameters/Username"
- $ref: "#/components/parameters/Operation"
- $ref: "#/components/parameters/Resource"
- $ref: "#/components/parameters/ActionKind"
responses:
"200":
description: a list of audit logs
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/AuditLog"
/auth/login:
post:
security: []
summary: login with password
operationId: login
tags:
- user
requestBody:
description: Partially filled script
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Login"
responses:
"200":
description: >
Successfully authenticated.
The session ID is returned in a cookie named `token` and as plaintext response.
Preferred method of authorization is through the bearer token. The cookie is only for browser convenience.
headers:
Set-Cookie:
schema:
type: string
example: token=abcde12345; Path=/; HttpOnly
content:
text/plain:
schema:
type: string
/w/{workspace}/users/add:
post:
summary: create user (require admin privilege)
operationId: createUser
tags:
- user
- admin
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: new user
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewUser"
responses:
"201":
description: user created
content:
text/plain:
schema:
type: string
/w/{workspace}/users/update/{username}:
post:
summary: update user (require admin privilege)
operationId: updateUser
tags:
- user
- admin
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- name: username
in: path
required: true
schema:
type: string
requestBody:
description: new user
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EditWorkspaceUser"
responses:
"200":
description: edited user
content:
text/plain:
schema:
type: string
/users/setpassword:
post:
summary: set password
operationId: setPassword
tags:
- user
requestBody:
description: set password
required: true
content:
application/json:
schema:
type: object
properties:
password:
type: string
required:
- password
responses:
"200":
description: password set
content:
text/plain:
schema:
type: string
/w/{workspace}/users/delete/{username}:
delete:
summary: delete user (require admin privilege)
operationId: deleteUser
tags:
- user
- admin
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- name: username
in: path
required: true
schema:
type: string
responses:
"200":
description: delete user
content:
text/plain:
schema:
type: string
/users/logout:
post:
summary: logout
operationId: logout
tags:
- user
responses:
"200":
description: logout
content:
text/plain:
schema:
type: string
/workspaces/list:
get:
summary: list all workspaces visible to me
operationId: listWorkspaces
tags:
- workspace
responses:
"200":
description: all workspaces
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Workspace"
/workspaces/users:
get:
summary: list all workspaces visible to me with user info
operationId: listUserWorkspaces
tags:
- workspace
responses:
"200":
description: workspace with associated username
content:
application/json:
schema:
$ref: "#/components/schemas/UserWorkspaceList"
/workspaces/list_as_superadmin:
get:
summary: list all workspaces as super admin (require to be super amdin)
operationId: listWorkspacesAsSuperAdmin
tags:
- workspace
parameters:
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
responses:
"200":
description: workspaces
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Workspace"
/workspaces/create:
post:
summary: create workspace
operationId: createWorkspace
tags:
- workspace
requestBody:
description: new token
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWorkspace"
responses:
"201":
description: token created
content:
text/plain:
schema:
type: string
/workspaces/validate_id:
post:
summary: validate id
operationId: validateId
tags:
- workspace
requestBody:
description: id of workspace
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: string
required:
- id
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/workspaces/validate_username:
post:
summary: validate username
operationId: validateUsername
tags:
- workspace
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: string
username:
type: string
required:
- id
- username
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/users/email:
get:
summary: get current user email (if logged in)
operationId: getCurrentEmail
tags:
- user
responses:
"200":
description: user email
content:
text/plain:
schema:
type: string
/users/whoami:
get:
summary: get current global whoami (if logged in)
operationId: globalWhoami
tags:
- user
responses:
"200":
description: user email
content:
application/json:
schema:
$ref: "#/components/schemas/GlobalWhoami"
/users/list_invites:
get:
summary: list all workspace invites
operationId: listWorkspaceInvites
tags:
- user
responses:
"200":
description: list all workspace invites
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/WorkspaceInvite"
/w/{workspace}/users/whoami:
get:
summary: whoami
operationId: whoami
tags:
- user
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: user
content:
application/json:
schema:
$ref: "#/components/schemas/User"
/w/{workspace}/users/leave_workspace:
post:
summary: leave workspace
operationId: leaveWorkspace
tags:
- user
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/users/accept_invite:
post:
summary: accept invite to workspace
operationId: acceptInvite
tags:
- user
requestBody:
description: accept invite
required: true
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
username:
type: string
required:
- workspace_id
- username
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/users/decline_invite:
post:
summary: decline invite to workspace
operationId: declineInvite
tags:
- user
requestBody:
description: decline invite
required: true
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
required:
- workspace_id
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/w/{workspace}/workspaces/invite_user:
post:
summary: invite user to workspace
operationId: inviteUser
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: WorkspaceInvite
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
is_admin:
type: boolean
required:
- email
- is_admin
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/w/{workspace}/workspaces/delete_invite:
post:
summary: delete user invite
operationId: delete invite
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: WorkspaceInvite
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
is_admin:
type: boolean
required:
- email
- is_admin
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/w/{workspace}/workspaces/delete:
delete:
summary: delete workspace
operationId: deleteWorkspace
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/w/{workspace}/users/whois/{username}:
get:
summary: whois
operationId: whois
tags:
- user
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- name: username
in: path
required: true
schema:
type: string
responses:
"200":
description: user
content:
application/json:
schema:
$ref: "#/components/schemas/User"
/users/list_as_super_admin:
get:
summary: list all users as super admin (require to be super amdin)
operationId: listUsersAsSuperAdmin
tags:
- user
parameters:
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
responses:
"200":
description: user
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
/w/{workspace}/workspaces/list_pending_invites:
get:
summary: list pending invites for a workspace
operationId: listPendingInvites
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: user
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/WorkspaceInvite"
/w/{workspace}/workspaces/get_settings:
get:
summary: get settings
operationId: getSettings
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: status
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
slack_name:
type: string
slack_team_id:
type: string
slack_command_script:
type: string
/w/{workspace}/workspaces/edit_slack_command:
post:
summary: edit slack command
operationId: editSlackCommand
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: WorkspaceInvite
required: true
content:
application/json:
schema:
type: object
properties:
slack_command_script:
type: string
responses:
"200":
description: status
content:
text/plain:
schema:
type: string
/w/{workspace}/users/list:
get:
summary: list users
operationId: listUsers
tags:
- user
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: user
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
/w/{workspace}/users/list_usernames:
get:
summary: list usernames
operationId: listUsernames
tags:
- user
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: user
content:
application/json:
schema:
type: array
items:
type: string
/users/tokens/create:
post:
summary: create token
operationId: createToken
tags:
- user
requestBody:
description: new token
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewToken"
responses:
"201":
description: token created
content:
text/plain:
schema:
type: string
/users/tokens/delete/{token_prefix}:
delete:
summary: delete token
operationId: deleteToken
tags:
- user
parameters:
- name: token_prefix
in: path
required: true
schema:
type: string
responses:
"200":
description: delete token
content:
text/plain:
schema:
type: string
/users/tokens/list:
get:
summary: list token
operationId: listTokens
tags:
- user
responses:
"200":
description: truncated token
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/TruncatedToken"
/w/{workspace}/variables/create:
post:
summary: create variable
operationId: createVariable
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: new variable
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateVariable"
responses:
"201":
description: variable created
content:
text/plain:
schema:
type: string
/w/{workspace}/variables/delete/{path}:
delete:
summary: delete variable
operationId: deleteVariable
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: variable deleted
content:
text/plain:
schema:
type: string
/w/{workspace}/variables/update/{path}:
post:
summary: update variable
operationId: updateVariable
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
requestBody:
description: updated variable
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EditVariable"
responses:
"200":
description: variable updated
content:
text/plain:
schema:
type: string
/w/{workspace}/variables/get/{path}:
get:
summary: get variable
operationId: getVariable
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
- name: decrypt_secret
description: |
ask to decrypt secret if this variable is secret
(if not secret no effect, default: true)
in: query
schema:
type: boolean
responses:
"200":
description: variable
content:
application/json:
schema:
$ref: "#/components/schemas/ListableVariable"
/w/{workspace}/variables/list:
get:
summary: list variables
operationId: listVariable
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: variable list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ListableVariable"
/w/{workspace}/variables/list_contextual:
get:
summary: list contextual variables
operationId: listContextualVariables
tags:
- variable
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: contextual variable list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ContextualVariable"
/w/{workspace}/oauth/disconnect/{client_name}:
post:
summary: disconnect client
operationId: disconnectClient
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ClientName"
responses:
"200":
description: disconnected client
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/create:
post:
summary: create resource
operationId: createResource
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: new resource
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateResource"
responses:
"201":
description: resource created
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/delete/{path}:
delete:
summary: delete resource
operationId: deleteResource
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: resource deleted
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/update/{path}:
post:
summary: update resource
operationId: updateResource
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
requestBody:
description: updated resource
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EditResource"
responses:
"200":
description: resource updated
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/get/{path}:
get:
summary: get resource
operationId: getResource
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: resource deleted
content:
application/json:
schema:
$ref: "#/components/schemas/Resource"
/w/{workspace}/resources/list:
get:
summary: list resources
operationId: listResource
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- name: resource_type
description: resource_type to list from
in: query
schema:
type: string
responses:
"200":
description: resource list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Resource"
/w/{workspace}/resources/type/create:
post:
summary: create resource_type
operationId: createResourceType
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: new resource_type
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceType"
responses:
"201":
description: resource_type created
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/type/delete/{path}:
delete:
summary: delete resource_type
operationId: deleteResourceType
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: resource_type deleted
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/type/update/{path}:
post:
summary: update resource_type
operationId: updateResourceType
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
requestBody:
description: updated resource_type
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EditResourceType"
responses:
"200":
description: resource_type updated
content:
text/plain:
schema:
type: string
/w/{workspace}/resources/type/get/{path}:
get:
summary: get resource_type
operationId: getResourceType
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: resource_type deleted
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceType"
/w/{workspace}/resources/type/list:
get:
summary: list resource_types
operationId: listResourceType
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: resource_type list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ResourceType"
/w/{workspace}/resources/type/listnames:
get:
summary: list resource_types names
operationId: listResourceTypeNames
tags:
- resource
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: resource_type list
content:
application/json:
schema:
type: array
items:
type: string
/w/{workspace}/scripts/list:
get:
summary: list all available scripts
operationId: listScripts
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- $ref: "#/components/parameters/OrderDesc"
- $ref: "#/components/parameters/CreatedBy"
- name: path_start
description: mask to filter matching starting parh
in: query
schema:
type: string
- name: path_exact
description: mask to filter exact matching path
in: query
schema:
type: string
- name: first_parent_hash
description: mask to filter scripts whom first direct parent has exact hash
in: query
schema:
type: string
- name: last_parent_hash
description: |
mask to filter scripts whom last parent in the chain has exact hash.
Beware that each script stores only a limited number of parents. Hence
the last parent hash for a script is not necessarily its top-most parent.
To find the top-most parent you will have to jump from last to last hash
until finding the parent
in: query
schema:
type: string
- name: parent_hash
description: |
is the hash present in the array of stored parent hashes for this script.
The same warning applies than for last_parent_hash. A script only store a
limited number of direct parent
in: query
schema:
type: string
- name: show_archived
description: |
(default false)
show also the archived files.
when multiple archived hash share the same path, only the ones with the latest create_at
are displayed.
in: query
schema:
type: boolean
- name: is_template
description: |
(default regardless)
if true show only the templates
if false show only the non templates
if not defined, show all regardless of if the script is a template
in: query
schema:
type: boolean
responses:
"200":
description: All available scripts
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Script"
/w/{workspace}/scripts/create:
post:
summary: create script
operationId: createScript
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: Partially filled script
required: true
content:
application/json:
schema:
type: object
properties:
path:
type: string
parent_hash:
type: string
summary:
type: string
description:
type: string
content:
type: string
schema:
type: object
is_template:
type: boolean
lock:
type: array
items:
type: string
required:
- path
- summary
- description
- content
responses:
"201":
description: script created
content:
text/plain:
schema:
type: string
/scripts/tojsonschema:
post:
summary: inspect code to infer jsonschema of arguments
operationId: toJsonschema
tags:
- script
requestBody:
description: code with the main function
required: true
content:
application/json:
schema:
type: string
responses:
"200":
description: parsed args
content:
application/json:
schema:
$ref: "#/components/schemas/MainArgSignature"
/w/{workspace}/scripts/archive/p/{path}:
post:
summary: archive script by path
operationId: archiveScriptByPath
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
responses:
"200":
description: script archived
content:
text/plain:
schema:
type: string
/w/{workspace}/scripts/archive/h/{hash}:
post:
summary: archive script by hash
operationId: archiveScriptByHash
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptHash"
responses:
"200":
description: script details
content:
application/json:
schema:
$ref: "#/components/schemas/Script"
/w/{workspace}/scripts/delete/h/{hash}:
post:
summary: delete script by hash (erase content but keep hash)
operationId: deleteScriptByHash
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptHash"
responses:
"200":
description: script details
content:
application/json:
schema:
$ref: "#/components/schemas/Script"
/w/{workspace}/scripts/get/p/{path}:
get:
summary: get script by path
operationId: getScriptByPath
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
responses:
"200":
description: script details
content:
application/json:
schema:
$ref: "#/components/schemas/Script"
/w/{workspace}/scripts/get/h/{hash}:
get:
summary: get script by hash
operationId: getScriptByHash
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptHash"
responses:
"200":
description: script details
content:
application/json:
schema:
$ref: "#/components/schemas/Script"
/w/{workspace}/scripts/deployment_status/h/{hash}:
get:
summary: get script deployment status
operationId: getScriptDeploymentStatus
tags:
- script
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptHash"
responses:
"200":
description: script details
content:
application/json:
schema:
type: object
properties:
lock:
type: string
lock_error_logs:
type: string
/w/{workspace}/jobs/run/p/{path}:
post:
summary: run script by path
operationId: runScriptByPath
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
- name: scheduled_for
description: when to schedule this job (leave empty for immediate run)
in: query
schema:
type: string
format: date-time
- name: scheduled_in_secs
description: schedule the script to execute in the number of seconds starting now
in: query
schema:
type: number
format: int64
- $ref: "#/components/parameters/ParentJob"
requestBody:
description: script args
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ScriptArgs"
responses:
"201":
description: job created
content:
text/plain:
schema:
type: string
format: uuid
/w/{workspace}/flows/list:
get:
summary: list all available flows
operationId: listFlows
tags:
- flow
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- $ref: "#/components/parameters/OrderDesc"
- $ref: "#/components/parameters/CreatedBy"
- name: path_start
description: mask to filter matching starting parh
in: query
schema:
type: string
- name: path_exact
description: mask to filter exact matching path
in: query
schema:
type: string
- name: show_archived
description: |
(default false)
show also the archived files.
when multiple archived hash share the same path, only the ones with the latest create_at
are displayed.
in: query
schema:
type: boolean
responses:
"200":
description: All available flow
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Flow"
/w/{workspace}/flows/get/{path}:
get:
summary: get flow by path
operationId: getFlowByPath
tags:
- flow
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
responses:
"200":
description: flow details
content:
application/json:
schema:
$ref: "#/components/schemas/Flow"
/w/{workspace}/flows/create:
post:
summary: create flow
operationId: createFlow
tags:
- flow
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: Partially filled flow
required: true
content:
application/json:
schema:
type: object
properties:
path:
type: string
summary:
type: string
description:
type: string
value:
$ref: "#/components/schemas/FlowValue"
schema:
type: object
required:
- path
- summary
- description
- content
- value
responses:
"201":
description: flow created
content:
text/plain:
schema:
type: string
/w/{workspace}/flows/update/{path}:
post:
summary: update flow
operationId: updateFlow
tags:
- flow
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
requestBody:
description: Partially filled flow
required: true
content:
application/json:
schema:
type: object
properties:
path:
type: string
summary:
type: string
description:
type: string
value:
$ref: "#/components/schemas/FlowValue"
schema:
type: object
required:
- path
- summary
- description
- content
- value
responses:
"200":
description: flow updated
content:
text/plain:
schema:
type: string
/w/{workspace}/flows/archive/{path}:
post:
summary: archive flow by path
operationId: archiveFlowByPath
tags:
- flow
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
responses:
"200":
description: flow archived
content:
text/plain:
schema:
type: string
/w/{workspace}/jobs/run/f/{path}:
post:
summary: run flow by path
operationId: runFlowByPath
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptPath"
- name: scheduled_for
description: when to schedule this job (leave empty for immediate run)
in: query
schema:
type: string
format: date-time
- name: scheduled_in_secs
description: schedule the script to execute in the number of seconds starting now
in: query
schema:
type: number
format: int64
- $ref: "#/components/parameters/ParentJob"
requestBody:
description: flow args
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ScriptArgs"
responses:
"201":
description: job created
content:
text/plain:
schema:
type: string
format: uuid
/w/{workspace}/jobs/run/h/{hash}:
post:
summary: run script by hash
operationId: runScriptByHash
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/ScriptHash"
- name: scheduled_for
description: when to schedule this job (leave empty for immediate run)
in: query
schema:
type: string
format: date-time
- name: scheduled_in_secs
description: schedule the script to execute in the number of seconds starting now
in: query
schema:
type: number
format: int64
- $ref: "#/components/parameters/ParentJob"
requestBody:
description: Partially filled args
required: true
content:
application/json:
schema:
type: object
responses:
"201":
description: job created
content:
text/plain:
schema:
type: string
format: uuid
/w/{workspace}/jobs/run/preview:
post:
summary: run script preview
operationId: runScriptPreview
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: previw
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Preview"
responses:
"201":
description: job created
content:
text/plain:
schema:
type: string
format: uuid
/w/{workspace}/jobs/run/preview_flow:
post:
summary: run flow preview
operationId: runFlowPreview
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: preview
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/FlowPreview"
responses:
"201":
description: job created
content:
text/plain:
schema:
type: string
format: uuid
/w/{workspace}/jobs/queue/list:
get:
summary: list all available queued jobs
operationId: listQueue
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/OrderDesc"
- $ref: "#/components/parameters/CreatedBy"
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/ScriptExactPath"
- $ref: "#/components/parameters/ScriptStartPath"
- $ref: "#/components/parameters/ScriptExactHash"
- $ref: "#/components/parameters/CreatedBefore"
- $ref: "#/components/parameters/CreatedAfter"
- $ref: "#/components/parameters/Success"
- $ref: "#/components/parameters/JobKinds"
responses:
"200":
description: All available queued jobs
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/QueuedJob"
/w/{workspace}/jobs/completed/list:
get:
summary: list all available completed jobs
operationId: listCompletedJobs
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/OrderDesc"
- $ref: "#/components/parameters/CreatedBy"
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/ScriptExactPath"
- $ref: "#/components/parameters/ScriptStartPath"
- $ref: "#/components/parameters/ScriptExactHash"
- $ref: "#/components/parameters/CreatedBefore"
- $ref: "#/components/parameters/CreatedAfter"
- $ref: "#/components/parameters/Success"
- $ref: "#/components/parameters/JobKinds"
responses:
"200":
description: All available completed jobs
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/CompletedJob"
/w/{workspace}/jobs/list:
get:
summary: list all available jobs
operationId: listJobs
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/CreatedBy"
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/ScriptExactPath"
- $ref: "#/components/parameters/ScriptStartPath"
- $ref: "#/components/parameters/ScriptExactHash"
- $ref: "#/components/parameters/CreatedBefore"
- $ref: "#/components/parameters/CreatedAfter"
- $ref: "#/components/parameters/JobKinds"
- name: success
description: filter on successful jobs
in: query
schema:
type: boolean
responses:
"200":
description: All jobs
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Job"
/w/{workspace}/jobs/get/{id}:
get:
summary: get job
operationId: getJob
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/JobId"
responses:
"200":
description: job details
content:
application/json:
schema:
$ref: "#/components/schemas/Job"
/w/{workspace}/jobs/getupdate/{id}:
get:
summary: get job updates
operationId: getJobUpdates
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/JobId"
- name: running
in: query
schema:
type: boolean
- name: log_offset
in: query
schema:
type: number
format: i32
responses:
"200":
description: job details
content:
application/json:
schema:
type: object
properties:
running:
type: boolean
completed:
type: boolean
new_logs:
type: string
/w/{workspace}/jobs/completed/get/{id}:
get:
summary: get completed job
operationId: getCompletedJob
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/JobId"
responses:
"200":
description: job details
content:
application/json:
schema:
$ref: "#/components/schemas/CompletedJob"
/w/{workspace}/jobs/completed/delete/{id}:
post:
summary: delete completed job (erase content but keep run id)
operationId: deleteCompletedJob
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/JobId"
responses:
"200":
description: job details
content:
application/json:
schema:
$ref: "#/components/schemas/CompletedJob"
/w/{workspace}/jobs/queue/cancel/{id}:
post:
summary: cancel queued job
operationId: cancelQueuedJob
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/JobId"
requestBody:
description: reason
required: true
content:
application/json:
schema:
type: object
properties:
reason:
type: string
responses:
"200":
description: job canceled
content:
text/plain:
schema:
type: string
/schedules/preview:
post:
summary: preview schedule
operationId: previewSchedule
tags:
- schedule
requestBody:
description: schedule
required: true
content:
application/json:
schema:
type: object
properties:
schedule:
type: string
offset:
type: integer
required:
- schedule
responses:
"200":
description: the preview of the next 10 time this schedule would apply to
content:
application/json:
schema:
type: array
items:
type: string
format: date-time
/w/{workspace}/schedules/create:
post:
summary: create schedule
operationId: createSchedule
tags:
- schedule
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: new schedule
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewSchedule"
responses:
"201":
description: schedule created
content:
text/plain:
schema:
type: string
/w/{workspace}/schedules/update/{path}:
post:
summary: update schedule
operationId: updateSchedule
tags:
- schedule
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
requestBody:
description: updated schedule
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EditSchedule"
responses:
"200":
description: schedule updated
content:
text/plain:
schema:
type: string
/w/{workspace}/schedules/setenabled/{path}:
post:
summary: set enabled schedule
operationId: setScheduleEnabled
tags:
- schedule
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
requestBody:
description: updated schedule enable
required: true
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
required:
- enabled
responses:
"200":
description: schedule enabled set
content:
text/plain:
schema:
type: string
/w/{workspace}/schedules/get/{path}:
get:
summary: get schedule
operationId: getSchedule
tags:
- schedule
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
responses:
"200":
description: schedule deleted
content:
application/json:
schema:
$ref: "#/components/schemas/Schedule"
/w/{workspace}/schedules/list:
get:
summary: list schedules
operationId: listSchedules
tags:
- schedule
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
responses:
"200":
description: schedule list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Schedule"
/w/{workspace}/groups/list:
get:
summary: list groups
operationId: listGroups
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
responses:
"200":
description: group list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Group"
/w/{workspace}/groups/listnames:
get:
summary: list group names
operationId: listGroupNames
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: group list
content:
application/json:
schema:
type: array
items:
type: string
/w/{workspace}/groups/create:
post:
summary: create group
operationId: createGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
requestBody:
description: create group
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
summary:
type: string
required:
- name
responses:
"200":
description: group created
content:
text/plain:
schema:
type: string
/w/{workspace}/groups/update/{name}:
post:
summary: update group
operationId: updateGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Name"
requestBody:
description: updated group
required: true
content:
application/json:
schema:
type: object
properties:
summary:
type: string
responses:
"200":
description: group updated
content:
text/plain:
schema:
type: string
/w/{workspace}/groups/delete/{name}:
delete:
summary: delete group
operationId: deleteGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Name"
responses:
"200":
description: group deleted
content:
text/plain:
schema:
type: string
/w/{workspace}/groups/get/{name}:
get:
summary: get group
operationId: getGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Name"
responses:
"200":
description: group
content:
application/json:
schema:
$ref: "#/components/schemas/Group"
/w/{workspace}/groups/adduser/{name}:
post:
summary: add user to group
operationId: addUserToGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Name"
requestBody:
description: added user to group
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
responses:
"200":
description: user added to group
content:
text/plain:
schema:
type: string
/w/{workspace}/groups/removeuser/{name}:
post:
summary: remove user to group
operationId: removeUserToGroup
tags:
- group
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Name"
requestBody:
description: added user to group
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
responses:
"200":
description: user removed from group
content:
text/plain:
schema:
type: string
/workers/list:
get:
summary: list workers
operationId: listWorkers
tags:
- worker
parameters:
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
responses:
"200":
description: a list of workers
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/WorkerPing"
/w/{workspace}/acls/get/{kind}/{path}:
get:
summary: get granular acls
operationId: getGranularAcls
tags:
- granular_acl
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
- name: kind
in: path
required: true
schema:
type: string
enum: [script, group_, resource, schedule, variable, flow]
responses:
"200":
description: acls
content:
application/json:
schema:
type: object
additionalProperties:
type: boolean
/w/{workspace}/acls/add/{kind}/{path}:
post:
summary: add granular acls
operationId: addGranularAcls
tags:
- granular_acl
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
- name: kind
in: path
required: true
schema:
type: string
enum: [script, group_, resource, schedule, variable, flow]
requestBody:
description: acl to add
required: true
content:
application/json:
schema:
type: object
properties:
owner:
type: string
write:
type: boolean
required: [owner]
responses:
"200":
description: granular acl added
content:
text/plain:
schema:
type: string
/w/{workspace}/acls/remove/{kind}/{path}:
post:
summary: remove granular acls
operationId: removeGranularAcls
tags:
- granular_acl
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Path"
- name: kind
in: path
required: true
schema:
type: string
enum: [script, group_, resource, schedule, variable, flow]
requestBody:
description: acl to add
required: true
content:
application/json:
schema:
type: object
properties:
owner:
type: string
required: [owner]
responses:
"200":
description: granular acl removed
content:
text/plain:
schema:
type: string
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
cookieAuth:
type: apiKey
in: cookie
name: token
parameters:
WorkspaceId:
name: workspace
in: path
required: true
schema:
type: string
ClientName:
name: client_name
in: path
required: true
schema:
type: string
ScriptPath:
name: path
in: path
required: true
schema:
type: string
ScriptHash:
name: hash
in: path
required: true
schema:
type: string
JobId:
name: id
in: path
required: true
schema:
type: string
format: uuid
Path:
name: path
in: path
required: true
schema:
type: string
PathId:
name: id
in: path
required: true
schema:
type: integer
format: int32
Name:
name: name
in: path
required: true
schema:
type: string
Page:
name: page
description: which page to return (start at 1, default 1)
in: query
schema:
type: integer
format: int32
PerPage:
name: per_page
description: number of items to return for a given page (default 30, max 100)
in: query
schema:
type: integer
format: int32
OrderDesc:
name: order_desc
description: order by desc order (default true)
in: query
schema:
type: boolean
CreatedBy:
name: created_by
description: mask to filter exact matching user creator
in: query
schema:
type: string
ParentJob:
name: parent_job
description: The parent job that is at the origin and responsible for the execution of this script if any
in: query
schema:
type: string
format: uuid
ScriptStartPath:
name: script_path_start
description: mask to filter matching starting path
in: query
schema:
type: string
ScriptExactPath:
name: script_path_exact
description: mask to filter exact matching path
in: query
schema:
type: string
ScriptExactHash:
name: script_hash
description: mask to filter exact matching path
in: query
schema:
type: string
CreatedBefore:
name: created_before
description: filter on created before (inclusive) timestamp
in: query
schema:
type: string
format: date-time
CreatedAfter:
name: created_after
description: filter on created after (exclusive) timestamp
in: query
schema:
type: string
format: date-time
Success:
name: success
description: filter on successful jobs
in: query
schema:
type: boolean
After:
name: after
description: filter on created after (exclusive) timestamp
in: query
schema:
type: string
format: date-time
Before:
name: before
description: filter on created before (exclusive) timestamp
in: query
schema:
type: string
format: date-time
Username:
name: username
description: filter on exact username of user
in: query
schema:
type: string
Operation:
name: operation
description: filter on exact or prefix name of operation
in: query
schema:
type: string
Resource:
name: resource
description: filter on exact or prefix name of resource
in: query
schema:
type: string
ActionKind:
name: action_kind
description: filter on type of operation
in: query
schema:
type: string
enum: [Create, Update, Delete, Execute]
JobKinds:
name: job_kinds
description: filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
in: query
schema:
type: string
# correct type is below but explode not supported by our codegen
# type: array
# items:
# type: string
# enum: ["preview", "script", "dependencies"]
# explode: false
schemas:
Script:
type: object
properties:
workspace_id:
type: string
hash:
type: string
path:
type: string
parent_hashes:
type: array
description: |
The first element is the direct parent of the script, the second is the parent of the first, etc
items:
type: string
summary:
type: string
description:
type: string
content:
type: string
created_by:
type: string
created_at:
type: string
format: date-time
archived:
type: boolean
schema:
type: object
deleted:
type: boolean
is_template:
type: boolean
extra_perms:
type: object
additionalProperties:
type: boolean
lock:
type: string
lock_error_logs:
type: string
required:
- hash
- path
- summary
- content
- created_by
- created_at
- archived
- deleted
- is_template
- extra_perms
ScriptArgs:
type: object
additionalProperties: true
QueuedJob:
type: object
properties:
id:
type: string
format: uuid
parent_job:
type: string
format: uuid
created_by:
type: string
created_at:
type: string
format: date-time
started_at:
type: string
format: date-time
scheduled_for:
type: string
format: date-time
running:
type: boolean
script_path:
type: string
script_hash:
type: string
args:
$ref: "#/components/schemas/ScriptArgs"
logs:
type: string
raw_code:
type: string
canceled:
type: boolean
canceled_by:
type: string
canceled_reason:
type: string
last_ping:
type: string
format: date-time
job_kind:
type: string
enum: ["script", "preview", "dependencies", "flow", "flowpreview"]
schedule_path:
type: string
permissioned_as:
type: string
description: |
The user (u/userfoo) or group (g/groupfoo) whom
the execution of this script will be permissioned_as and by extension its DT_TOKEN.
flow_status:
$ref: "#/components/schemas/FlowStatus"
raw_flow:
$ref: "#/components/schemas/FlowValue"
is_flow_step:
type: boolean
required:
- id
- running
- canceled
- job_kind
- permissioned_as
- is_flow_step
CompletedJob:
type: object
properties:
id:
type: string
format: uuid
parent_job:
type: string
format: uuid
created_by:
type: string
created_at:
type: string
format: date-time
duration:
type: integer
success:
type: boolean
script_path:
type: string
script_hash:
type: string
args:
$ref: "#/components/schemas/ScriptArgs"
result:
type: object
logs:
type: string
deleted:
type: boolean
raw_code:
type: string
canceled:
type: boolean
canceled_by:
type: string
canceled_reason:
type: string
job_kind:
type: string
enum: ["script", "preview", "dependencies", "flow", "flowpreview"]
schedule_path:
type: string
permissioned_as:
type: string
description: |
The user (u/userfoo) or group (g/groupfoo) whom
the execution of this script will be permissioned_as and by extension its DT_TOKEN.
flow_status:
$ref: "#/components/schemas/FlowStatus"
raw_flow:
$ref: "#/components/schemas/FlowValue"
is_flow_step:
type: boolean
required:
- id
- success
- canceled
- job_kind
- permissioned_as
- is_flow_step
Job:
allOf:
- oneOf:
- $ref: "#/components/schemas/CompletedJob"
- $ref: "#/components/schemas/QueuedJob"
- type: object
properties:
type:
type: string
enum: [CompletedJob, QueuedJob]
discriminator:
propertyName: type
User:
type: object
properties:
email:
type: string
username:
type: string
is_admin:
type: boolean
is_super_admin:
type: boolean
created_at:
type: string
format: date-time
operator:
type: boolean
disabled:
type: boolean
groups:
type: array
items:
type: string
required:
- email
- username
- is_admin
- is_super_admin
- created_at
- operator
- disabled
Login:
type: object
properties:
email:
type: string
password:
type: string
required:
- email
- password
NewUser:
type: object
properties:
email:
type: string
username:
type: string
is_admin:
type: boolean
required:
- email
- username
- is_admin
EditWorkspaceUser:
type: object
properties:
is_admin:
type: boolean
TruncatedToken:
type: object
properties:
label:
type: string
expiration:
type: string
format: date-time
token_prefix:
type: string
created_at:
type: string
format: date-time
last_used_at:
type: string
format: date-time
required:
- token_prefix
- created_at
- last_used_at
NewToken:
type: object
properties:
label:
type: string
expiration:
type: string
format: date-time
ListableVariable:
type: object
properties:
workspace_id:
type: string
path:
type: string
value:
type: string
is_secret:
type: boolean
description:
type: string
extra_perms:
type: object
additionalProperties:
type: boolean
required:
- workspace_id
- path
- is_secret
- extra_perms
ContextualVariable:
type: object
properties:
name:
type: string
value:
type: string
description:
type: string
required:
- name
- value
- description
CreateVariable:
type: object
properties:
path:
type: string
value:
type: string
is_secret:
type: boolean
description:
type: string
required:
- path
- value
- is_secret
- description
EditVariable:
type: object
properties:
path:
type: string
value:
type: string
is_secret:
type: boolean
description:
type: string
AuditLog:
type: object
properties:
id:
type: integer
format: int32
timestamp:
type: string
format: date-time
username:
type: string
operation:
type: string
enum:
- "jobs.run"
- "scripts.create"
- "scripts.update"
- "users.create"
- "users.delete"
- "users.setpassword"
- "users.update"
- "users.login"
- "users.token.create"
- "users.token.delete"
- "variables.create"
- "variables.delete"
- "variables.update"
action_kind:
type: string
enum: ["Created", "Updated", "Delete", "Execute"]
resource:
type: string
parameters:
type: object
required:
- id
- timestamp
- username
- operation
- action_kind
MainArgSignature:
type: object
properties:
star_args:
type: boolean
star_kwargs:
type: boolean
args:
type: array
items:
type: object
properties:
name:
type: string
typ:
type: string
enum: ["str", "float", "int", "bool", "unknown"]
has_default:
type: boolean
default: {}
required:
- name
- typ
required:
- star_args
- start_kwargs
- args
Preview:
type: object
properties:
content:
type: string
path:
type: string
args:
$ref: "#/components/schemas/ScriptArgs"
required:
- content
- args
CreateResource:
type: object
properties:
path:
type: string
value:
type: object
description:
type: string
resource_type:
type: string
required:
- path
- value
- resource_type
EditResource:
type: object
properties:
path:
type: string
description:
type: string
value:
type: object
Resource:
type: object
properties:
workspace_id:
type: string
path:
type: string
description:
type: string
resource_type:
type: string
value:
type: object
extra_perms:
type: object
additionalProperties:
type: boolean
required:
- path
- resource_type
ResourceType:
type: object
properties:
workspace_id:
type: string
name:
type: string
schema: {}
description:
type: string
required:
- name
EditResourceType:
type: object
properties:
schema:
type: string
description:
type: string
Schedule:
type: object
properties:
path:
type: string
edited_by:
type: string
edited_at:
type: string
format: date-time
schedule:
type: string
offset_:
type: integer
enabled:
type: boolean
script_path:
type: string
is_flow:
type: boolean
args:
$ref: "#/components/schemas/ScriptArgs"
extra_perms:
type: object
additionalProperties:
type: boolean
required:
- path
- edited_by
- edited_at
- schedule
- script_path
- offset_
- extra_perms
- is_flow
NewSchedule:
type: object
properties:
path:
type: string
schedule:
type: string
offset:
type: integer
script_path:
type: string
is_flow:
type: boolean
args:
$ref: "#/components/schemas/ScriptArgs"
required:
- path
- schedule
- script_path
- is_flow
- args
EditSchedule:
type: object
properties:
schedule:
type: string
script_path:
type: string
is_flow:
type: boolean
args:
$ref: "#/components/schemas/ScriptArgs"
required:
- schedule
- script_path
- is_flow
- args
Group:
type: object
properties:
name:
type: string
summary:
type: string
members:
type: array
items:
type: string
extra_perms:
type: object
additionalProperties:
type: boolean
required:
- name
WorkerPing:
type: object
properties:
worker:
type: string
worker_instance:
type: string
ping_at:
type: string
format: date-time
started_at:
type: string
format: date-time
ip:
type: string
jobs_executed:
type: number
format: int32
required:
- worker
- worker_instance
- ping_at
- started_at
- ip
- jobs_executed
UserWorkspaceList:
type: object
properties:
email:
type: string
workspaces:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
username:
type: string
required:
- id
- name
- username
required:
- email
- workspaces
CreateWorkspace:
type: object
properties:
id:
type: string
name:
type: string
username:
type: string
domain:
type: string
required:
- id
- name
- username
- domain
Workspace:
type: object
properties:
id:
type: string
name:
type: string
owner:
type: string
domain:
type: string
required:
- id
- name
- owner
WorkspaceInvite:
type: object
properties:
workspace_id:
type: string
email:
type: string
is_admin:
type: boolean
required:
- workspace_id
- email
- is_admin
GlobalWhoami:
type: object
properties:
email:
type: string
login_type:
type: string
enum: ["password", "github"]
super_admin:
type: boolean
verified:
type: boolean
name:
type: string
company:
type: string
required:
- email
- login_type
- super_admin
- verified
Flow:
type: object
properties:
workspace_id:
type: string
path:
type: string
summary:
type: string
description:
type: string
value:
$ref: "#/components/schemas/FlowValue"
edited_by:
type: string
edited_at:
type: string
format: date-time
archived:
type: boolean
schema:
type: object
extra_perms:
type: object
additionalProperties:
type: boolean
required:
- path
- summary
- value
- edited_by
- edited_at
- archived
- extra_perms
FlowValue:
type: object
properties:
modules:
type: array
items:
$ref: "#/components/schemas/FlowModule"
failure_module:
$ref: "#/components/schemas/FlowModule"
required:
- modules
FlowModule:
type: object
properties:
input_transform:
type: object
additionalProperties:
$ref: "#/components/schemas/InputTransform"
value:
$ref: "#/components/schemas/FlowModuleValue"
required:
- input_transform
- value
InputTransform:
type: object
properties:
type:
type: string
enum:
- static
- javascript
step:
type: number
value: {}
expr:
type: string
FlowModuleValue:
type: object
properties:
path:
type: string
type:
type: string
enum:
- script
- flow
required:
- type
- path
FlowPreview:
type: object
properties:
value:
$ref: "#/components/schemas/FlowValue"
path:
type: string
args:
$ref: "#/components/schemas/ScriptArgs"
required:
- value
- content
- args
FlowStatus:
type: object
properties:
step:
type: integer
modules:
type: array
items:
$ref: "#/components/schemas/FlowStatusModule"
failure_module:
$ref: "#/components/schemas/FlowStatusModule"
required:
- step
- modules
- failure_module
FlowStatusModule:
type: object
properties:
type:
type: string
enum:
- WaitingForPriorSteps
- WaitingForEvent
- WaitingForExecutor
- InProgress
- Success
- Failure
job:
type: string
format: uuid
event:
type: string
required: [type]