> ## 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 PTY session

> Retrieve detailed information about a specific pseudo-terminal (PTY) session.



## OpenAPI

````yaml /openapi.json get /pty/{ptyID}
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /pty/{ptyID}:
    get:
      summary: Get PTY session
      description: >-
        Retrieve detailed information about a specific pseudo-terminal (PTY)
        session.
      operationId: pty.get
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
        - in: path
          name: ptyID
          schema:
            type: string
            pattern: ^pty.*
          required: true
      responses:
        '200':
          description: Session info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pty'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.pty.get({
              ...
            })
components:
  schemas:
    Pty:
      type: object
      properties:
        id:
          type: string
          pattern: ^pty.*
        title:
          type: string
        command:
          type: string
        args:
          type: array
          items:
            type: string
        cwd:
          type: string
        status:
          type: string
          enum:
            - running
            - exited
        pid:
          type: number
      required:
        - id
        - title
        - command
        - args
        - cwd
        - status
        - pid
    NotFoundError:
      type: object
      properties:
        name:
          type: string
          const: NotFoundError
        data:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - name
        - data

````

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