> ## 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.

# List Ai Tickets

> Tickets are ordered by updated_at DESC, id DESC (stable). Prefer keyset pagination: pass the previous page's next_cursor as cursor; offset is ignored when cursor is set and remains only for existing clients. total_count is always the full filtered population. The search filter is a case-insensitive substring match on title and body; %, _ and \ in the search text match literally.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/org/ai-tickets
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/ai-tickets:
    get:
      tags:
        - AI Tickets API
      summary: List Ai Tickets
      description: >-
        Tickets are ordered by updated_at DESC, id DESC (stable). Prefer keyset
        pagination: pass the previous page's next_cursor as cursor; offset is
        ignored when cursor is set and remains only for existing clients.
        total_count is always the full filtered population. The search filter is
        a case-insensitive substring match on title and body; %, _ and \ in the
        search text match literally.
      operationId: list_ai_tickets_api_v1_org_ai_tickets_get
      parameters:
        - in: query
          name: status
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - in: query
          name: kind
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Kind
        - in: query
          name: priority
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Priority
        - in: query
          name: assignee_agent_task_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Assignee Agent Task Id
          description: Comma-separated; matches any of the listed values.
        - in: query
          name: assignee_user_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Assignee User Id
          description: Comma-separated; matches any of the listed values.
        - in: query
          name: parent_ticket_id
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Parent Ticket Id
        - in: query
          name: top_level_only
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Top Level Only
        - in: query
          name: cluster_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cluster Id
          description: Comma-separated; matches any of the listed values.
        - in: query
          name: label
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Label
          description: Comma-separated; matches any of the listed values.
        - in: query
          name: search
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - in: query
          name: needs_human
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Needs Human
        - in: query
          name: include_closed
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Include Closed
        - in: query
          name: limit
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Limit
        - in: query
          name: offset
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Offset
        - description: >-
            Keyset pagination cursor: the next_cursor value from the previous
            page. Opaque. When set, offset is ignored.
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - in: query
          name: cluster_scope
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cluster Scope
        - 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
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTicketListResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    AiTicketListResponse:
      properties:
        tickets:
          items:
            $ref: '#/components/schemas/AiTicketResponse'
          type: array
          title: Tickets
        total_count:
          type: integer
          title: Total Count
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Keyset cursor for the page after this one (pass as the cursor query
            parameter); null when this page was not full.
          title: Next Cursor
      required:
        - tickets
        - total_count
        - next_cursor
      title: AiTicketListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AiTicketResponse:
      properties:
        id:
          format: uuid
          type: string
          title: Id
        ticket_number:
          type: integer
          title: Ticket Number
        title:
          type: string
          title: Title
        body:
          type: string
          title: Body
        kind:
          type: string
          title: Kind
        status:
          type: string
          title: Status
        priority:
          type: string
          title: Priority
        assignee_agent_task_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Assignee Agent Task Id
        assignee_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Agent Name
        assignee_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Id
        assignee_user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Email
        parent_ticket_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Parent Ticket Id
        parent_ticket_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Ticket Number
        sub_ticket_count:
          type: integer
          title: Sub Ticket Count
        open_sub_ticket_count:
          type: integer
          title: Open Sub Ticket Count
        cluster_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Cluster Id
        cluster_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cluster Name
        cluster_archived:
          title: Cluster Archived
          type: boolean
        alert_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Alert Id
        source_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Kind
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        plan_document:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Document
        plan_status:
          type: string
          title: Plan Status
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Workspace Id
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_thread_ts:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Thread Ts
        teams_conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Teams Conversation Id
        labels:
          items:
            type: string
          type: array
          title: Labels
        created_by_kind:
          type: string
          title: Created By Kind
        created_by:
          type: string
          title: Created By
        resolution:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution
        recurrence_count:
          type: integer
          title: Recurrence Count
        last_event_sequence:
          type: integer
          title: Last Event Sequence
        created_at:
          format: date-time
          type: string
          title: Created At
        updated_at:
          format: date-time
          type: string
          title: Updated At
        closed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Closed At
        status_changed_at:
          format: date-time
          type: string
          title: Status Changed At
      required:
        - id
        - ticket_number
        - title
        - body
        - kind
        - status
        - priority
        - assignee_agent_task_id
        - assignee_agent_name
        - assignee_user_id
        - assignee_user_email
        - parent_ticket_id
        - parent_ticket_number
        - sub_ticket_count
        - open_sub_ticket_count
        - cluster_id
        - cluster_name
        - cluster_archived
        - alert_id
        - source_kind
        - source_id
        - plan_document
        - plan_status
        - workspace_id
        - slack_channel_id
        - slack_thread_ts
        - teams_conversation_id
        - labels
        - created_by_kind
        - created_by
        - resolution
        - recurrence_count
        - last_event_sequence
        - created_at
        - updated_at
        - closed_at
        - status_changed_at
      title: AiTicketResponse
      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

````