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

# Get Session



## OpenAPI

````yaml https://api.truestate.io/openapi.json get /automations/{automation_id}/sessions/{session_id}/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://docs.truestate.io/docs/api/client-api-keys) for internal an
    external authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://docs.truestate.io/docs/api/overview)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: http://docs.truestate.io/
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.11.78
servers: []
security: []
tags:
  - name: assistants
    description: Management of assistants
  - name: api-keys
    description: Management of each user personal Client API Keys, used to access this API.
  - name: models
    description: Management of models
  - name: secrets
    description: Management of client secrets for accessing external services
  - name: deployments
    description: Management of deployments.
  - name: pipelines
    description: Management of pipelines.
  - name: pipeline-runs
    description: Management of pipeline runs.
  - name: automations
    description: Management of Automations.
  - name: automation-sessions
    description: Management of Automation Sessions.
  - name: chatbots
    description: Chatbot endpoints.
  - name: check-auto-recharge
    description: ''
  - name: classification-classes
    description: >-
      Management of zero shot classifications (using ai to apply new categories
      to a dataset).
  - name: conversations
    description: Management of conversations
  - name: conventions
    description: Management of conventions - best practices for actuators and agents
  - name: credit-usage
    description: Management of Credits.
  - name: dashboards
    description: Management of Dashboards.
  - name: data
    description: Bigquery inference services
  - name: data-dictionary
    description: Data Dictionary endpoints.
  - name: datasets
    description: Dataset endpoints.
  - name: documents
    description: Document endpoints.
  - name: default
    description: Default health checks.
  - name: embedding-search
    description: ''
  - name: inference
    description: Model inference services
  - name: messages
    description: Management of messages
  - name: notebooks
    description: ''
  - name: notebook-services
    description: ''
  - name: organisations
    description: Management of Organisations.
  - name: payment-methods
    description: Management of Payment methods.
  - name: private-tasks
    description: ''
  - name: private-pipelines
    description: ''
  - name: private-data
    description: ''
  - name: renew-seats
    description: ''
  - name: tagging-lists
    description: Management of Tagging Lists.
  - name: tasks
    description: ''
  - name: task-templates
    description: Management of task templates (definitions and schedules).
  - name: agents
    description: ''
  - name: user
    description: Management of User.
  - name: user-context
    description: Management of User Context.
  - name: private-messages
    description: ''
  - name: private-llm-call
    description: ''
  - name: admin-organisations
    description: ''
  - name: private-warehouser
    description: ''
  - name: private-pipeline-tracking
    description: ''
  - name: private-pipeline-runs
    description: ''
  - name: private-reports
    description: ''
  - name: private-bootstrap
    description: ''
  - name: reports
    description: ''
  - name: private-conversations
    description: ''
  - name: private-datasets
    description: ''
  - name: private-dashboards
    description: ''
  - name: private-conventions
    description: ''
  - name: private-documents
    description: ''
paths:
  /automations/{automation_id}/sessions/{session_id}/:
    get:
      tags:
        - automation-sessions
      summary: Get Session
      operationId: get_session_automations__automation_id__sessions__session_id___get
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Automation Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: Api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationSessionRead'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AutomationSessionRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        automation_id:
          type: string
          format: uuid
          title: Automation Id
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        status:
          $ref: '#/components/schemas/AutomationSessionStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        steps:
          items:
            $ref: '#/components/schemas/AutomationSessionStepRead'
          type: array
          title: Steps
        steps_count:
          type: integer
          title: Steps Count
          readOnly: true
        current_step:
          anyOf:
            - $ref: '#/components/schemas/AutomationSessionStepRead'
            - type: 'null'
          readOnly: true
      type: object
      required:
        - id
        - automation_id
        - inputs
        - error
        - status
        - created_at
        - updated_at
        - steps
        - steps_count
        - current_step
      title: AutomationSessionRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AutomationSessionStatus:
      type: string
      enum:
        - NEW
        - RUNNING
        - FINISHED
        - FAILED
      title: AutomationSessionStatus
    AutomationSessionStepRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          $ref: '#/components/schemas/AutomationSessionStatus'
        prompt:
          anyOf:
            - $ref: '#/components/schemas/StartParams'
            - $ref: '#/components/schemas/LLMCallParams'
            - $ref: '#/components/schemas/LogicDecisionParams'
            - $ref: '#/components/schemas/WebScrapeParams'
            - $ref: '#/components/schemas/PythonParams'
            - $ref: '#/components/schemas/RestApiParams'
            - $ref: '#/components/schemas/EmbeddingSearchParams-Output'
            - $ref: '#/components/schemas/TextToJsonParams'
            - $ref: '#/components/schemas/DataTransformParams'
          title: Prompt
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        step:
          $ref: '#/components/schemas/AutomationStepRead'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - status
        - prompt
        - result
        - error
        - step
        - created_at
        - updated_at
      title: AutomationSessionStepRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    StartParams:
      properties:
        type:
          type: string
          const: START
          title: Type
      type: object
      required:
        - type
      title: StartParams
    LLMCallParams:
      properties:
        type:
          type: string
          const: LLM_CALL
          title: Type
        prompt:
          type: string
          title: Prompt
        model_type:
          type: string
          title: Model Type
      type: object
      required:
        - type
        - prompt
        - model_type
      title: LLMCallParams
    LogicDecisionParams:
      properties:
        type:
          type: string
          const: LOGIC_DECISION
          title: Type
        prompt:
          type: string
          title: Prompt
      type: object
      required:
        - type
        - prompt
      title: LogicDecisionParams
    WebScrapeParams:
      properties:
        type:
          type: string
          const: WEB_SCRAPE
          title: Type
        url:
          type: string
          title: Url
        country_code:
          type: string
          title: Country Code
      type: object
      required:
        - type
        - url
        - country_code
      title: WebScrapeParams
    PythonParams:
      properties:
        type:
          type: string
          const: PYTHON
          title: Type
        code:
          type: string
          title: Code
      type: object
      required:
        - type
        - code
      title: PythonParams
    RestApiParams:
      properties:
        type:
          type: string
          const: REST_API
          title: Type
        url:
          type: string
          title: Url
        method:
          type: string
          title: Method
        headers:
          type: string
          title: Headers
        body:
          type: string
          title: Body
      type: object
      required:
        - type
        - url
        - method
        - headers
        - body
      title: RestApiParams
    EmbeddingSearchParams-Output:
      properties:
        type:
          type: string
          const: EMBEDDING_SEARCH
          title: Type
        sentence:
          type: string
          title: Sentence
        dataset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Dataset Id
        filters:
          items:
            $ref: '#/components/schemas/ColumnFilter'
          type: array
          title: Filters
          default: []
      type: object
      required:
        - type
        - sentence
        - dataset_id
      title: EmbeddingSearchParams
    TextToJsonParams:
      properties:
        type:
          type: string
          const: TEXT_TO_JSON
          title: Type
        text:
          type: string
          title: Text
        json_structure:
          additionalProperties:
            type: string
          type: object
          title: Json Structure
        model_type:
          $ref: '#/components/schemas/LLMModelType'
      type: object
      required:
        - type
        - text
        - json_structure
        - model_type
      title: TextToJsonParams
    DataTransformParams:
      properties:
        type:
          type: string
          const: DATA_TRANSFORM
          title: Type
        query:
          type: string
          title: Query
      type: object
      required:
        - type
        - query
      title: DataTransformParams
    AutomationStepRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        step_type:
          $ref: '#/components/schemas/AutomationStepType'
        prompt_template:
          oneOf:
            - $ref: '#/components/schemas/StartParams'
            - $ref: '#/components/schemas/LLMCallParams'
            - $ref: '#/components/schemas/LogicDecisionParams'
            - $ref: '#/components/schemas/WebScrapeParams'
            - $ref: '#/components/schemas/PythonParams'
            - $ref: '#/components/schemas/RestApiParams'
            - $ref: '#/components/schemas/EmbeddingSearchParams-Output'
            - $ref: '#/components/schemas/TextToJsonParams'
            - $ref: '#/components/schemas/DataTransformParams'
          title: Prompt Template
          discriminator:
            propertyName: type
            mapping:
              DATA_TRANSFORM: '#/components/schemas/DataTransformParams'
              EMBEDDING_SEARCH: '#/components/schemas/EmbeddingSearchParams-Output'
              LLM_CALL: '#/components/schemas/LLMCallParams'
              LOGIC_DECISION: '#/components/schemas/LogicDecisionParams'
              PYTHON: '#/components/schemas/PythonParams'
              REST_API: '#/components/schemas/RestApiParams'
              START: '#/components/schemas/StartParams'
              TEXT_TO_JSON: '#/components/schemas/TextToJsonParams'
              WEB_SCRAPE: '#/components/schemas/WebScrapeParams'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - step_type
        - prompt_template
        - created_at
        - updated_at
      title: AutomationStepRead
    ColumnFilter:
      properties:
        uid:
          type: string
          title: Uid
        column:
          type: string
          title: Column
        column_type:
          $ref: '#/components/schemas/ColumnType'
        filter_condition:
          oneOf:
            - $ref: '#/components/schemas/GeneralFilterCondition'
            - $ref: '#/components/schemas/NonNegatedFilterCondition'
            - $ref: '#/components/schemas/IsInFilterCondition'
          title: Filter Condition
          discriminator:
            propertyName: operator
            mapping:
              CONTAINS: '#/components/schemas/GeneralFilterCondition'
              ENDS_WITH: '#/components/schemas/GeneralFilterCondition'
              EQUALS: '#/components/schemas/GeneralFilterCondition'
              GREATER_THAN: '#/components/schemas/NonNegatedFilterCondition'
              GREATER_THAN_OR_EQUALS: '#/components/schemas/NonNegatedFilterCondition'
              IS_IN: '#/components/schemas/IsInFilterCondition'
              IS_NULL: '#/components/schemas/GeneralFilterCondition'
              LESS_THAN: '#/components/schemas/NonNegatedFilterCondition'
              LESS_THAN_OR_EQUALS: '#/components/schemas/NonNegatedFilterCondition'
              STARTS_WITH: '#/components/schemas/GeneralFilterCondition'
      type: object
      required:
        - uid
        - column
        - column_type
        - filter_condition
      title: ColumnFilter
    LLMModelType:
      type: string
      enum:
        - truestate
        - gemini-embedding-001
        - gemini-2.0-flash
        - gemini-2.5-flash
        - gemini-2.5-flash-lite
        - gemini-2.5-pro
        - gemini-3-pro-preview
        - gemini-3-flash-preview
        - gpt-4.1
        - gpt-5-2025-08-07
        - gpt-5-mini-2025-08-07
        - gpt-5-nano-2025-08-07
        - gpt-5.1-2025-11-13
        - o4-mini-2025-04-16
        - moonshotai/kimi-k2-instruct-0905
        - openai/gpt-oss-120b
        - whisper-1
        - >-
          ['gpt-4.1', 'gpt-5-2025-08-07', 'gpt-5-mini-2025-08-07',
          'gpt-5-nano-2025-08-07', 'o4-mini-2025-04-16', 'gpt-5.1-2025-11-13',
          'whisper-1']
        - >-
          ['gemini-2.0-flash', 'gemini-2.5-flash', 'gemini-2.5-flash-lite',
          'gemini-2.5-pro', 'gemini-3-pro-preview', 'gemini-3-flash-preview']
        - '[''truestate'']'
        - '[''moonshotai/kimi-k2-instruct-0905'', ''openai/gpt-oss-120b'']'
      title: LLMModelType
    AutomationStepType:
      type: string
      enum:
        - START
        - LLM_CALL
        - GET_USER_INPUT
        - LOGIC_DECISION
        - EMBEDDING_SEARCH
        - REST_API
        - WEB_SCRAPE
        - PYTHON
        - TEXT_TO_JSON
        - DATA_TRANSFORM
      title: AutomationStepType
    ColumnType:
      type: string
      enum:
        - BOOLEAN
        - STRING
        - NUMBER
        - DATETIME
      title: ColumnType
    GeneralFilterCondition:
      properties:
        operator:
          type: string
          enum:
            - EQUALS
            - IS_NULL
            - CONTAINS
            - STARTS_WITH
            - ENDS_WITH
          title: Operator
        value:
          type: string
          title: Value
        is_negated:
          type: boolean
          title: Is Negated
          default: false
      type: object
      required:
        - operator
        - value
      title: GeneralFilterCondition
    NonNegatedFilterCondition:
      properties:
        operator:
          type: string
          enum:
            - GREATER_THAN
            - GREATER_THAN_OR_EQUALS
            - LESS_THAN
            - LESS_THAN_OR_EQUALS
          title: Operator
        value:
          type: string
          title: Value
      type: object
      required:
        - operator
        - value
      title: NonNegatedFilterCondition
    IsInFilterCondition:
      properties:
        operator:
          type: string
          const: IS_IN
          title: Operator
          default: IS_IN
        values:
          items:
            type: string
          type: array
          title: Values
        is_negated:
          type: boolean
          title: Is Negated
          default: false
      type: object
      required:
        - values
      title: IsInFilterCondition
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````