> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get session status

> Retrieve the current status of all sessions, including active, idle, and completed states.



## OpenAPI

````yaml /openapi.json get /session/status
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /session/status:
    get:
      summary: Get session status
      description: >-
        Retrieve the current status of all sessions, including active, idle, and
        completed states.
      operationId: session.status
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      responses:
        '200':
          description: Get session status
          content:
            application/json:
              schema:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  $ref: '#/components/schemas/SessionStatus'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.session.status({
              ...
            })
components:
  schemas:
    SessionStatus:
      anyOf:
        - type: object
          properties:
            type:
              type: string
              const: idle
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              const: retry
            attempt:
              type: number
            message:
              type: string
            next:
              type: number
          required:
            - type
            - attempt
            - message
            - next
        - type: object
          properties:
            type:
              type: string
              const: busy
          required:
            - type
    BadRequestError:
      type: object
      properties:
        data: {}
        errors:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        success:
          type: boolean
          const: false
      required:
        - data
        - errors
        - success

````

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