Label Studio subpackage_workspaces.subpackage_workspaces/members API

The subpackage_workspaces.subpackage_workspaces/members API from Label Studio — 1 operation(s) for subpackage_workspaces.subpackage_workspaces/members.

OpenAPI Specification

label-studio-subpackage-workspaces-subpackage-workspaces-members-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference subpackage_actions subpackage_workspaces.subpackage_workspaces/members API
  version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_workspaces.subpackage_workspaces/members
paths:
  /api/workspaces/{id}/memberships/:
    get:
      operationId: list
      summary: ✨ List workspace memberships
      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>\nGet a list of all members in a specific workspace."
      tags:
      - subpackage_workspaces.subpackage_workspaces/members
      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: A list of workspace memberships
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkspaceMemberList'
    post:
      operationId: create
      summary: ✨ Create workspace membership
      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>\nAdd a new workspace member by user ID."
      tags:
      - subpackage_workspaces.subpackage_workspaces/members
      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/WorkspaceMemberCreate'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceMemberCreateRequest'
    delete:
      operationId: delete
      summary: ✨ Delete workspace membership
      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>\nRemove a specific member by ID from a workspace. Pass the member ID via the `user_id` query parameter. For backward compatibility, a JSON body with `user_id` (or `user`) is still accepted."
      tags:
      - subpackage_workspaces.subpackage_workspaces/members
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: user_id
        in: query
        description: User ID to remove from the workspace.
        required: false
        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
components:
  schemas:
    TrialRoleEnum:
      type: string
      enum:
      - annotator
      - annotator_team_manager
      - business_analyst
      - business_or_data_team_leadership
      - data_engineer_platform_engineer
      - data_scientist
      - other
      description: '* `annotator` - Annotator

        * `annotator_team_manager` - Annotator Team Manager

        * `business_analyst` - Business Analyst

        * `business_or_data_team_leadership` - Business Or Data Team Leadership

        * `data_engineer_platform_engineer` - Data Engineer Platform Engineer

        * `data_scientist` - Data Scientist

        * `other` - Other'
      title: TrialRoleEnum
    OnboardingStateEnum:
      type: string
      enum:
      - not_started
      - signup
      - trial_signup
      - first_tutorial
      - in_app_guidance
      - complete
      description: '* `not_started` - Not Started

        * `signup` - Signup

        * `trial_signup` - Trial Signup

        * `first_tutorial` - First Tutorial

        * `in_app_guidance` - In App Guidance

        * `complete` - Complete'
      title: OnboardingStateEnum
    LseUser:
      type: object
      properties:
        active_organization:
          type:
          - integer
          - 'null'
        active_organization_meta:
          type: string
        allow_newsletters:
          type:
          - boolean
          - 'null'
          description: Allow sending newsletters to user
        avatar:
          type: string
        custom_hotkeys:
          oneOf:
          - description: Any type
          - type: 'null'
          description: Custom keyboard shortcuts configuration for the user interface
        date_joined:
          type: string
          format: date-time
        email:
          type: string
          format: email
        first_name:
          type: string
        id:
          type: integer
        initials:
          type: string
          default: '?'
        last_activity:
          type: string
          format: date-time
        last_name:
          type: string
        lse_fields:
          $ref: '#/components/schemas/LseFields'
        org_membership:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationMembership'
        organization_membership:
          $ref: '#/components/schemas/OrganizationMembership'
        pause:
          type: string
        phone:
          type: string
        username:
          type: string
      required:
      - active_organization_meta
      - avatar
      - id
      - initials
      - last_activity
      - lse_fields
      - org_membership
      - organization_membership
      - pause
      - username
      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: LseUser
    OrganizationMembership:
      type: object
      properties:
        active:
          type: string
        organization_id:
          type: integer
          description: Organization ID
        role:
          type: string
      required:
      - active
      - organization_id
      - role
      title: OrganizationMembership
    LseFields:
      type: object
      properties:
        email_notification_settings:
          type: string
        invite_activated:
          type:
          - boolean
          - 'null'
        invite_expired:
          type: string
        invite_expired_at:
          type: string
        invited_at:
          type:
          - string
          - 'null'
          format: date-time
        invited_by:
          type:
          - integer
          - 'null'
        onboarding_state:
          oneOf:
          - $ref: '#/components/schemas/OnboardingStateEnum'
          - type: 'null'
          description: 'The current stage of user onboarding


            * `not_started` - Not Started

            * `signup` - Signup

            * `trial_signup` - Trial Signup

            * `first_tutorial` - First Tutorial

            * `in_app_guidance` - In App Guidance

            * `complete` - Complete'
        social_auth_finished:
          type:
          - boolean
          - 'null'
          description: Is user finished social authentication
        trial_company:
          type:
          - string
          - 'null'
        trial_experience_labeling:
          type:
          - string
          - 'null'
        trial_license_enterprise:
          type:
          - boolean
          - 'null'
        trial_models_in_production:
          type:
          - string
          - 'null'
        trial_role:
          oneOf:
          - $ref: '#/components/schemas/TrialRoleEnum'
          - type: 'null'
      required:
      - email_notification_settings
      - invite_expired
      - invite_expired_at
      title: LseFields
    WorkspaceMemberCreate:
      type: object
      properties:
        user:
          type: integer
          description: User ID
        workspace:
          type: integer
          description: Workspace ID
      required:
      - user
      title: WorkspaceMemberCreate
    WorkspaceMemberCreateRequest:
      type: object
      properties:
        user:
          type: integer
          description: User ID
        workspace:
          type: integer
          description: Workspace ID
      required:
      - user
      title: WorkspaceMemberCreateRequest
    WorkspaceMemberList:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/LseUser'
        workspace:
          type: integer
          description: Workspace ID
      required:
      - user
      title: WorkspaceMemberList
  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>'