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

# Stream chat responses for cluster troubleshooting



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/clusters/{cluster_id}/kubernetes/chat
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/clusters/{cluster_id}/kubernetes/chat:
    post:
      tags:
        - Chat API
      summary: Stream chat responses for cluster troubleshooting
      operationId: chat_endpoint_api_v1_org_clusters__cluster_id__kubernetes_chat_post
      parameters:
        - in: path
          name: cluster_id
          required: true
          schema:
            format: uuid4
            title: Cluster Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnifiedTroubleshootRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Streaming chat response
        '401':
          description: Unauthorized
        '404':
          description: Cluster not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    UnifiedTroubleshootRequest:
      properties:
        addon_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Addon Name
        chart_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chart Name
        chart_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Chart Version
        compliance_focus:
          anyOf:
            - $ref: '#/components/schemas/ComplianceFocus'
            - type: 'null'
          title: Compliance Focus
        conversation_history:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConversationMessage'
              type: array
            - type: 'null'
          title: Conversation History
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        current_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Current Values
        default_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Default Values
        draft_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Id
        idempotency_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Idempotency Key
        images:
          anyOf:
            - items:
                $ref: '#/components/schemas/ImageAttachment'
              type: array
            - type: 'null'
          title: Images
        include_logs:
          default: true
          title: Include Logs
          type: boolean
        interaction_mode:
          default: agentic
          enum:
            - ask
            - agentic
            - plan
          title: Interaction Mode
          type: string
        is_config_page:
          default: false
          title: Is Config Page
          type: boolean
        max_log_lines:
          default: 50
          title: Max Log Lines
          type: integer
        model_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Mode
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
        page_context:
          anyOf:
            - $ref: '#/components/schemas/PageContext'
            - type: 'null'
        query:
          title: Query
          type: string
        rag_context:
          anyOf:
            - $ref: '#/components/schemas/RAGContext'
            - type: 'null'
        regenerate_seed:
          anyOf:
            - type: string
            - type: 'null'
          title: Regenerate Seed
        repository_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Repository Name
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Name
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Type
        supersedes_plan_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Supersedes Plan Id
      required:
        - query
      title: UnifiedTroubleshootRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ComplianceFocus:
      properties:
        check_id:
          maxLength: 128
          minLength: 1
          title: Check Id
          type: string
        benchmark_id:
          anyOf:
            - maxLength: 128
              minLength: 1
              type: string
            - type: 'null'
          title: Benchmark Id
        source:
          enum:
            - benchmark
            - config_audit
          title: Source
          type: string
      required:
        - check_id
        - source
      title: ComplianceFocus
      type: object
    ConversationMessage:
      properties:
        content:
          description: Message content
          title: Content
          type: string
        images:
          anyOf:
            - items:
                $ref: '#/components/schemas/ImageAttachment'
              type: array
            - type: 'null'
          description: Attached images
          title: Images
        role:
          description: 'Message role: user or assistant'
          title: Role
          type: string
        tools_used:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolUsedSummary'
              type: array
            - type: 'null'
          description: >-
            Tools invoked while producing this message. Forwarded by the portal
            so the next turn can detect prior assistant write actions for
            post-write verification.
          title: Tools Used
      required:
        - role
        - content
      title: ConversationMessage
      type: object
    ImageAttachment:
      properties:
        data:
          description: Base64-encoded image data
          title: Data
          type: string
        media_type:
          description: 'MIME type: image/png, image/jpeg, image/gif, image/webp'
          title: Media Type
          type: string
      required:
        - media_type
        - data
      title: ImageAttachment
      type: object
    PageContext:
      properties:
        active_tab:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Tab
        current_url:
          title: Current Url
          type: string
        filters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filters
        page_type:
          title: Page Type
          type: string
        viewing_addon:
          anyOf:
            - $ref: '#/components/schemas/ViewingAddon'
            - type: 'null'
        viewing_resource:
          anyOf:
            - $ref: '#/components/schemas/ViewingResource'
            - type: 'null'
        viewing_stack:
          anyOf:
            - $ref: '#/components/schemas/ViewingStack'
            - type: 'null'
        viewing_stack_profile:
          anyOf:
            - $ref: '#/components/schemas/ViewingStackProfile'
            - type: 'null'
      required:
        - page_type
        - current_url
      title: PageContext
      type: object
    RAGContext:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/RAGSearchResult'
          title: Documents
          type: array
        query:
          default: ''
          title: Query
          type: string
        retrieval_time_ms:
          default: 0
          title: Retrieval Time Ms
          type: number
        total_tokens_estimated:
          default: 0
          title: Total Tokens Estimated
          type: integer
      title: RAGContext
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ToolUsedSummary:
      properties:
        finished_at:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO8601 timestamp the tool completed
          title: Finished At
        parameters_preview:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Sanitised snapshot of the tool input parameters
          title: Parameters Preview
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Outcome of the tool call: success or error'
          title: Status
        tool_name:
          description: Name of the tool the assistant invoked
          title: Tool Name
          type: string
      required:
        - tool_name
      title: ToolUsedSummary
      type: object
    ViewingAddon:
      properties:
        addon_name:
          title: Addon Name
          type: string
        stack_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Stack Name
      required:
        - addon_name
      title: ViewingAddon
      type: object
    ViewingResource:
      properties:
        api_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Version
        kind:
          title: Kind
          type: string
        name:
          title: Name
          type: string
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
      required:
        - kind
        - name
      title: ViewingResource
      type: object
    ViewingStack:
      properties:
        draft_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Id
        is_draft:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Draft
        is_new_stack:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is New Stack
        stack_name:
          title: Stack Name
          type: string
      required:
        - stack_name
      title: ViewingStack
      type: object
    ViewingStackProfile:
      properties:
        draft_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Id
        is_new_profile:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is New Profile
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
      title: ViewingStackProfile
      type: object
    RAGSearchResult:
      properties:
        content:
          title: Content
          type: string
        document_id:
          format: uuid4
          title: Document Id
          type: string
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        similarity_score:
          title: Similarity Score
          type: number
        source_id:
          anyOf:
            - format: uuid4
              type: string
            - type: 'null'
          title: Source Id
        source_type:
          $ref: '#/components/schemas/SourceType'
      required:
        - document_id
        - content
        - source_type
        - similarity_score
      title: RAGSearchResult
      type: object
    SourceType:
      enum:
        - chart
        - chart_readme
        - chart_values
        - chart_version
        - helm_registry
        - k8s_pattern
        - troubleshoot
        - troubleshoot_guide
        - documentation
        - conversation
        - platform_resource
        - kubernetes_docs
      title: SourceType
      type: string

````