ToolJet Workspaces API

Workspace management endpoints

OpenAPI Specification

tooljet-workspaces-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ToolJet External Applications Workspaces API
  description: 'The ToolJet External API provides REST endpoints for managing users, workspaces, applications (export/import), groups, and user role assignments across a ToolJet instance. It is enabled via environment variables and secured with a static access token using Basic authentication.

    '
  version: 1.0.0
  contact:
    name: ToolJet
    url: https://tooljet.com/
  license:
    name: AGPL-3.0
    url: https://github.com/ToolJet/ToolJet/blob/main/LICENSE
servers:
- url: https://{instance}/api/ext
  description: ToolJet instance
  variables:
    instance:
      default: your-tooljet-instance.com
      description: Hostname of the ToolJet deployment
security:
- BasicAuth: []
tags:
- name: Workspaces
  description: Workspace management endpoints
paths:
  /workspaces:
    get:
      summary: List all workspaces
      operationId: getAllWorkspaces
      tags:
      - Workspaces
      responses:
        '200':
          description: List of workspaces
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /update-user-role/workspace/{workspaceId}:
    put:
      summary: Update user role in a workspace
      operationId: updateUserRole
      tags:
      - Workspaces
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditUserRoleDto'
      responses:
        '200':
          description: User role updated
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Authentication required or invalid token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    UserRole:
      type: string
      enum:
      - admin
      - developer
      - viewer
      - end-user
    Workspace:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    EditUserRoleDto:
      type: object
      required:
      - role
      properties:
        role:
          $ref: '#/components/schemas/UserRole'
        userId:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  parameters:
    WorkspaceId:
      name: workspaceId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Workspace UUID
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: 'Static access token configured via the TOOLJET_SERVICE_TOKEN environment variable. Pass the token as the username with an empty password, encoded as Base64 in the Authorization header.

        '