Windmill Groups API

User groups for role-based access control.

Documentation

Specifications

Other Resources

OpenAPI Specification

windmill-dev-groups-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Windmill Apps Groups API
  description: 'Windmill is an open-source developer platform that turns scripts into internal tools, UIs, workflows, and cron jobs, executed by a distributed worker fleet. This is a representative subset of the Windmill REST API - the same surface used by the Windmill CLI and web UI. The authoritative, machine-generated specification is served live at GET /openapi.yaml (see https://app.windmill.dev/openapi.html); this document curates the most commonly used, stable endpoints for discovery.

    Almost every resource is scoped under a workspace at the /w/{workspace} path prefix. Windmill runs as Windmill Cloud (base https://app.windmill.dev/api) or self-hosted (base http(s)://your-host/api). Requests are authenticated with a Bearer token created in the Windmill UI under account settings, or with a session cookie.'
  version: 1.745.0
  contact:
    name: Windmill
    url: https://www.windmill.dev
  license:
    name: AGPL-3.0 (community) / Windmill Enterprise License
    url: https://github.com/windmill-labs/windmill/blob/main/LICENSE
servers:
- url: https://app.windmill.dev/api
  description: Windmill Cloud
- url: http://localhost:8000/api
  description: Local development (self-hosted)
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: Groups
  description: User groups for role-based access control.
paths:
  /w/{workspace}/groups/list:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    get:
      operationId: listGroups
      tags:
      - Groups
      summary: List groups
      description: Lists user groups in a workspace.
      responses:
        '200':
          description: A list of groups.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Group'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /w/{workspace}/groups/create:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    post:
      operationId: createGroup
      tags:
      - Groups
      summary: Create a group
      description: Creates a new user group.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '201':
          description: Creation confirmation.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /w/{workspace}/groups/adduser/{name}:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/Name'
    post:
      operationId: addUserToGroup
      tags:
      - Groups
      summary: Add a user to a group
      description: Adds a user to the named group.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
      responses:
        '200':
          description: Update confirmation.
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer token or session cookie.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Group:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        summary:
          type: string
        members:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
            message:
              type: string
  parameters:
    Workspace:
      name: workspace
      in: path
      required: true
      description: The workspace id (tenant) the resource belongs to.
      schema:
        type: string
    Name:
      name: name
      in: path
      required: true
      description: The group name.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token created in the Windmill UI under account settings, passed as Authorization: Bearer YOUR_TOKEN.'
    cookieAuth:
      type: apiKey
      in: cookie
      name: token
      description: Session cookie set by the Windmill web UI after login.