Windmill user API

The user API from Windmill — 53 operation(s) for user.

OpenAPI Specification

windmill-user-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.694.0
  title: Windmill admin user API
  contact:
    name: Windmill Team
    email: contact@windmill.dev
    url: https://windmill.dev
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-logo:
    url: https://windmill.dev/img/windmill.svg
servers:
- url: /api
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: user
paths:
  /auth/login:
    post:
      security: []
      summary: Login with Password
      operationId: login
      tags:
      - user
      requestBody:
        description: credentials
        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
  /auth/logout:
    post:
      security: []
      summary: Logout
      operationId: logout
      tags:
      - user
      responses:
        '200':
          description: clear cookies and clear token (if applicable)
          headers:
            Set-Cookie:
              schema:
                type: string
          content:
            text/plain:
              schema:
                type: string
  /auth/is_smtp_configured:
    get:
      security: []
      summary: Check if SMTP is Configured for Password Reset
      operationId: isSmtpConfigured
      tags:
      - user
      responses:
        '200':
          description: returns true if SMTP is configured
          content:
            application/json:
              schema:
                type: boolean
  /auth/is_password_login_disabled:
    get:
      security: []
      summary: Check if Password Login is Disabled Instance-wide
      operationId: isPasswordLoginDisabled
      tags:
      - user
      responses:
        '200':
          description: returns true if password login is disabled
          content:
            application/json:
              schema:
                type: boolean
  /auth/request_password_reset:
    post:
      security: []
      summary: Request Password Reset Email
      operationId: requestPasswordReset
      tags:
      - user
      requestBody:
        description: email to send password reset link to
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                  format: email
      responses:
        '200':
          description: password reset email sent (if user exists)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasswordResetResponse'
        '400':
          description: SMTP not configured
  /auth/reset_password:
    post:
      security: []
      summary: Reset Password Using Token
      operationId: resetPassword
      tags:
      - user
      requestBody:
        description: token and new password
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - new_password
              properties:
                token:
                  type: string
                new_password:
                  type: string
      responses:
        '200':
          description: password reset successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasswordResetResponse'
        '400':
          description: invalid or expired token
  /w/{workspace}/users/get/{username}:
    get:
      summary: Get User (require Admin Privilege)
      operationId: getUser
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: user created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
  /w/{workspace}/users/update/{username}:
    post:
      summary: Update User (require Admin Privilege)
      operationId: updateUser
      tags:
      - user
      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
  /w/{workspace}/users/is_owner/{path}:
    get:
      summary: Is Owner of Path
      operationId: isOwnerOfPath
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - $ref: '#/components/parameters/Path'
      responses:
        '200':
          description: is owner
          content:
            application/json:
              schema:
                type: boolean
  /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
  /users/set_password_of/{user}:
    post:
      summary: Set Password for a Specific User (require Super Admin)
      operationId: setPasswordForUser
      tags:
      - user
      parameters:
      - name: user
        in: path
        required: true
        schema:
          type: string
      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
  /users/set_login_type/{user}:
    post:
      summary: Set Login Type for a Specific User (require Super Admin)
      operationId: setLoginTypeForUser
      tags:
      - user
      parameters:
      - name: user
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: set login type
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                login_type:
                  type: string
              required:
              - login_type
      responses:
        '200':
          description: login type set
          content:
            text/plain:
              schema:
                type: string
  /users/create:
    post:
      summary: Create User
      operationId: createUserGlobally
      tags:
      - user
      requestBody:
        description: user info
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                password:
                  type: string
                super_admin:
                  type: boolean
                name:
                  type: string
                company:
                  type: string
                skip_email:
                  type: boolean
                  description: Skip sending email notifications to the user
              required:
              - email
              - password
              - super_admin
      responses:
        '201':
          description: user created
          content:
            text/plain:
              schema:
                type: string
  /users/update/{email}:
    post:
      summary: Global Update User (require Super Admin)
      operationId: globalUserUpdate
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: new user info
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                is_super_admin:
                  type: boolean
                is_devops:
                  type: boolean
                name:
                  type: string
                disabled:
                  type: boolean
      responses:
        '200':
          description: user updated
          content:
            text/plain:
              schema:
                type: string
  /users/username_info/{email}:
    get:
      summary: Global Username Info (require Super Admin)
      operationId: globalUsernameInfo
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: user renamed
          content:
            application/json:
              schema:
                type: object
                properties:
                  username:
                    type: string
                  workspace_usernames:
                    type: array
                    items:
                      type: object
                      properties:
                        workspace_id:
                          type: string
                        username:
                          type: string
                      required:
                      - workspace_id
                      - username
                required:
                - username
                - workspace_usernames
  /users/rename/{email}:
    post:
      summary: Global Rename User (require Super Admin)
      operationId: globalUserRename
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: new username
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                new_username:
                  type: string
              required:
              - new_username
      responses:
        '200':
          description: user renamed
          content:
            text/plain:
              schema:
                type: string
  /users/delete/{email}:
    delete:
      summary: Global Delete User (require Super Admin)
      operationId: globalUserDelete
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: user deleted
          content:
            text/plain:
              schema:
                type: string
  /users/overwrite:
    post:
      summary: Global Overwrite Users (require Super Admin and EE)
      operationId: globalUsersOverwrite
      tags:
      - user
      requestBody:
        description: List of users
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ExportedUser'
      responses:
        '200':
          description: Success message
          content:
            text/plain:
              schema:
                type: string
  /users/export:
    get:
      summary: Global Export Users (require Super Admin and EE)
      operationId: globalUsersExport
      tags:
      - user
      responses:
        '200':
          description: exported users
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExportedUser'
  /users/ext_jwt_tokens:
    get:
      summary: List External JWT Tokens (ee Only)
      operationId: listExtJwtTokens
      tags:
      - user
      parameters:
      - name: page
        in: query
        schema:
          type: integer
      - name: per_page
        in: query
        schema:
          type: integer
      - name: active_only
        in: query
        description: only tokens used in the last 30 days
        schema:
          type: boolean
      responses:
        '200':
          description: list of external JWT tokens
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExternalJwtToken'
  /users/onboarding:
    post:
      summary: Submit User Onboarding Data
      operationId: submitOnboardingData
      tags:
      - user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                touch_point:
                  type: string
                use_case:
                  type: string
      responses:
        '200':
          description: Onboarding data submitted successfully
          content:
            application/json:
              schema:
                type: string
  /w/{workspace}/users/delete/{username}:
    delete:
      summary: Delete User (require Admin Privilege)
      operationId: deleteUser
      tags:
      - user
      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
  /w/{workspace}/users/offboard_preview/{username}:
    get:
      summary: Preview Offboarding for a Workspace User (require Admin Privilege)
      operationId: offboardPreview
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: offboard preview with object counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffboardPreview'
  /w/{workspace}/users/offboard/{username}:
    post:
      summary: Offboard a Workspace User (reassign Objects, Optionally Delete User)
      operationId: offboardWorkspaceUser
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: username
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OffboardRequest'
      responses:
        '200':
          description: offboard response with conflicts or summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffboardResponse'
  /users/offboard_preview/{email}:
    get:
      summary: Preview Global Offboarding for a User Across All Workspaces (require Super Admin)
      operationId: globalOffboardPreview
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: per-workspace offboard previews
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalOffboardPreview'
  /users/offboard/{email}:
    post:
      summary: Offboard a User Globally (reassign Objects Across Workspaces, Optionally Delete)
      operationId: offboardGlobalUser
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GlobalOffboardRequest'
      responses:
        '200':
          description: offboard result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffboardResponse'
  /w/{workspace}/users/convert_to_group/{username}:
    post:
      summary: Convert Manual User to Group User (require Admin Privilege)
      operationId: convertUserToGroup
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: convert user to group user
          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/refresh_token:
    get:
      summary: Refresh the Current Token
      operationId: refreshUserToken
      tags:
      - user
      parameters:
      - name: if_expiring_in_less_than_s
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: new token
          content:
            text/plain:
              schema:
                type: string
  /users/tutorial_progress:
    get:
      summary: Get Tutorial Progress
      operationId: getTutorialProgress
      tags:
      - user
      responses:
        '200':
          description: tutorial progress
          content:
            application/json:
              schema:
                type: object
                properties:
                  progress:
                    type: integer
                  skipped_all:
                    type: boolean
    post:
      summary: Update Tutorial Progress
      operationId: updateTutorialProgress
      tags:
      - user
      requestBody:
        description: progress update
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                progress:
                  type: integer
                skipped_all:
                  type: boolean
      responses:
        '200':
          description: tutorial progress
          content:
            text/plain:
              schema:
                type: string
  /users/leave_instance:
    post:
      summary: Leave Instance
      operationId: leaveInstance
      tags:
      - user
      responses:
        '200':
          description: status
          content:
            text/plain:
              schema:
                type: string
  /users/usage:
    get:
      summary: Get Current Usage Outside of Premium Workspaces
      operationId: getUsage
      tags:
      - user
      responses:
        '200':
          description: free usage
          content:
            text/plain:
              schema:
                type: number
  /users/all_runnables:
    get:
      summary: Get All Runnables in Every Workspace
      operationId: getRunnable
      tags:
      - user
      responses:
        '200':
          description: free all runnables
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    type: string
                  endpoint_async:
                    type: string
                  endpoint_sync:
                    type: string
                  summary:
                    type: string
                  description:
                    type: string
                  kind:
                    type: string
                required:
                - workspace
                - endpoint_async
                - endpoint_sync
                - summary
                - kind
  /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/GlobalUserInfo'
  /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'
  /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
      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}/users/impersonate_service_account:
    post:
      summary: Impersonate a Service Account
      operationId: impersonateServiceAccount
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
              required:
              - username
      responses:
        '201':
          description: impersonation token
          content:
            text/plain:
              schema:
                type: string
  /w/{workspace}/users/exit_impersonation:
    post:
      summary: Exit Service Account Impersonation
      operationId: exitImpersonation
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
              required:
              - token
      responses:
        '200':
          description: exited impersonation
          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/exists/{email}:
    get:
      summary: Exists Email
      operationId: existsEmail
      tags:
      - user
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: user
          content:
            application/json:
              schema:
                type: boolean
  /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'
      - name: active_only
        in: query
        description: filter only active users
        schema:
          type: boolean
      responses:
        '200':
          description: user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GlobalUserInfo'
  /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_usage:
    get:
      summary: List Users Usage
      operationId: listUsersUsage
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      responses:
        '200':
          description: user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserUsage'
  /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
  /w/{workspace}/users/username_to_email/{username}:
    get:
      summary: Get Email from Username
      operationId: usernameToEmail
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: email
          content:
            text/plain:
              schema:
                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/impersonate:
    post:
      summary: Create Token to Impersonate a User (require Superadmin)
      operationId: createTokenImpersonate
      tags:
      - user
      requestBody:
        description: new token
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTokenImpersonate'
      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/update_scopes/{token_prefix}:
    post:
      summary: Update Scopes of an Existing Token (owner Only)
      operationId: updateTokenScopes
      tags:
      - user
      parameters:
      - name: token_prefix
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: new scopes (null or omitted = full access)
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scopes:
                  type: array
                  items:
                    type: string
                  nullable: true
      responses:
        '200':
          description: scopes updated
          content:
            text/plain:
              schema:
                type: string
  /users/tokens/list:
    get:
      summary: List Token
      operationId: listTokens
      tags:
      - user
      parameters:
      - name: exclude_ephemeral
        in: query
        schema:
          type: boolean
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      responses:
        '200':
          description: truncated token
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TruncatedToken'
  /oauth/login_callback/{client_name}:
    post:
      security: []
      summary: Login with Oauth Authorization Flow
      operationId: loginWithOauth
      tags:
      - user
      parameters:
      - $ref: '#/components/parameters/ClientName'
      requestBody:
        description: Partially filled script
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                state:
                  type: string
      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
components:
  schemas:
    OffboardPreview:
      type: object
      properties:
        owned:
          $ref: '#/components/schemas/OffboardAffectedPaths'
          description: Objects under u/{username}/ that will be reassigned
        executing_on_behalf:
          $ref: '#/components/schemas/OffboardAffectedPaths'
          description: Objects not under the user's path but that execute on behalf of this user (permissioned_as/on_behalf_of will be updated)
        referencing:
          $ref: '#/components/schemas/OffboardAffectedPaths'
          description: Scripts/flows/apps/resources whose content or value references this user's paths (may break after reassignment)
        tokens:
          type: array
 

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/windmill/refs/heads/main/openapi/windmill-user-api-openapi.yml