> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a chat workspace



## OpenAPI

````yaml get /api/chat/workspaces/{workspace_id}
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/chat/workspaces/{workspace_id}:
    get:
      tags:
        - Chat
      summary: Get a chat workspace
      operationId: get_workspace_api_chat_workspaces__workspace_id__get
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatWorkspaceResponse'
        '403':
          description: Owners only.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found, or you aren't a member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ChatWorkspaceResponse:
      properties:
        id:
          type: string
          title: Id
          description: Workspace ID.
        name:
          type: string
          title: Name
          description: Display name.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: What it's for.
        created_by:
          type: string
          title: Created By
          description: Who created it.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When it was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When its details last changed.
        your_role:
          $ref: '#/components/schemas/ChatWorkspaceRole'
          description: Your highest role in it, directly or through a realm role.
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: >-
            Standing instructions for the assistant, as Markdown. Added to the
            base prompt, never replacing it, and added to rather than replacing
            any the workspace sets. Cannot change which tools exist or which
            need approval.
        defaults:
          $ref: '#/components/schemas/ChatContextDefaults'
          description: What the assistant reaches for first in this workspace.
      type: object
      required:
        - id
        - name
        - created_by
        - created_at
        - updated_at
        - your_role
      title: ChatWorkspaceResponse
      description: A workspace, with your role in it.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChatWorkspaceRole:
      type: string
      enum:
        - owner
        - editor
        - viewer
      title: ChatWorkspaceRole
      description: What a workspace member can do.
    ChatContextDefaults:
      properties:
        trino_catalog:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Trino Catalog
          description: Trino catalog to query unless the user names another.
        trino_schema:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Trino Schema
          description: Schema within that catalog.
        datahub_domain:
          anyOf:
            - type: string
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Datahub Domain
          description: DataHub domain to search first.
        decisions_workspace:
          anyOf:
            - type: string
              maxLength: 64
              pattern: ^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,127}$
            - type: 'null'
          title: Decisions Workspace
          description: Business-rules workspace to author and read rules in.
      type: object
      title: ChatContextDefaults
      description: |-
        What the assistant should reach for first, unless told otherwise.

        Every field names something owned by another system, so none of them
        are checked here — see "Pinned defaults are preferences" in
        `api.services.chat.context`. The portal offers pickers rather than
        free text, which is where a typo is actually prevented.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.