Label Studio subpackage_workspaces API

The subpackage_workspaces API from Label Studio — 2 operation(s) for subpackage_workspaces.

OpenAPI Specification

label-studio-subpackage-workspaces-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference subpackage_actions subpackage_workspaces API
  version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_workspaces
paths:
  /api/workspaces/:
    get:
      operationId: list
      summary: ✨ List workspaces
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nList all workspaces for your organization. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces)."
      tags:
      - subpackage_workspaces
      parameters:
      - name: include_all_workspaces
        in: query
        description: Include all workspaces in the organization, including other users' personal workspaces. Only effective for users with Administrator or Owner role. When enabled, the response includes created_by_user info for personal workspaces.
        required: false
        schema:
          type: boolean
      - name: is_archived
        in: query
        description: Filter by archived status. Set to false to exclude archived workspaces.
        required: false
        schema:
          type: boolean
      - name: is_personal
        in: query
        description: Workspace is a personal user workspace.
        required: false
        schema:
          type: boolean
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workspace'
    post:
      operationId: create
      summary: ✨ Create workspace
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nCreate a new workspace. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces)."
      tags:
      - subpackage_workspaces
      parameters:
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceRequest'
  /api/workspaces/{id}/:
    get:
      operationId: get
      summary: ✨ Get workspace
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nRetrieve details for a specific workspace by ID."
      tags:
      - subpackage_workspaces
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
    delete:
      operationId: delete
      summary: ✨ Delete workspace
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nDelete a specific workspace by ID."
      tags:
      - subpackage_workspaces
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
    patch:
      operationId: update
      summary: ✨ Update workspace
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nUpdate settings for a specific workspace by ID."
      tags:
      - subpackage_workspaces
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedWorkspaceRequest'
components:
  schemas:
    WorkspaceRequest:
      type: object
      properties:
        color:
          type:
          - string
          - 'null'
          description: Color
        description:
          type:
          - string
          - 'null'
          description: Workspace description
        is_archived:
          type: boolean
          description: Workspace is archived
        is_personal:
          type: boolean
          description: Workspace is a personal user workspace
        title:
          type: string
          description: Workspace Name
      required:
      - title
      description: 'A ModelSerializer that takes additional arguments for

        "fields", "omit" and "expand" in order to

        control which fields are displayed, and whether to replace simple

        values with complex, nested serializations'
      title: WorkspaceRequest
    PatchedWorkspaceRequest:
      type: object
      properties:
        color:
          type:
          - string
          - 'null'
          description: Color
        description:
          type:
          - string
          - 'null'
          description: Workspace description
        is_archived:
          type: boolean
          description: Workspace is archived
        is_personal:
          type: boolean
          description: Workspace is a personal user workspace
        title:
          type: string
          description: Workspace Name
      description: 'A ModelSerializer that takes additional arguments for

        "fields", "omit" and "expand" in order to

        control which fields are displayed, and whether to replace simple

        values with complex, nested serializations'
      title: PatchedWorkspaceRequest
    Workspace:
      type: object
      properties:
        color:
          type:
          - string
          - 'null'
          description: Color
        created_by:
          type: integer
        created_by_user:
          type: string
        description:
          type:
          - string
          - 'null'
          description: Workspace description
        id:
          type: integer
        is_archived:
          type: boolean
          description: Workspace is archived
        is_personal:
          type: boolean
          description: Workspace is a personal user workspace
        membership:
          type: string
        projects_count:
          type:
          - integer
          - 'null'
        title:
          type: string
          description: Workspace Name
      required:
      - created_by
      - created_by_user
      - id
      - membership
      - projects_count
      - title
      description: 'A ModelSerializer that takes additional arguments for

        "fields", "omit" and "expand" in order to

        control which fields are displayed, and whether to replace simple

        values with complex, nested serializations'
      title: Workspace
  securitySchemes:
    Token:
      type: apiKey
      in: header
      name: Authorization
      description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'