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

# Get Interaction Steps

> The ordered steps of a record: skeletons by default, content with ``include=content``. Order is
``seq``, which is the record's own sequence, never a timestamp. The record is verified when it is
read (``GET /interactions/{id}``), so ``trace`` here is the stored block without ``verified``.

API key permission: Admin.



## OpenAPI

````yaml /api-reference/openapi.json get /interactions/{interaction_id}/steps
openapi: 3.1.0
info:
  title: Neural Factory API
  version: 0.1.0
  description: >-
    The endpoints a program can call with an API key. Exchange the key's secret
    for a token at POST /apikeys/token and send it as a Bearer token.
servers:
  - url: https://api.neuralfactory.ai
    description: SaaS
  - url: https://{apiHost}
    description: 'Enterprise: the API address of your own deployment'
    variables:
      apiHost:
        default: api.example.com
        description: Your deployment's API host
security:
  - bearerAuth: []
tags:
  - name: API keys
  - name: Chat
  - name: Runs
  - name: Agents
  - name: Workflows
  - name: Schedules
  - name: Knowledge bases
  - name: Documents
  - name: Search
  - name: Skills
  - name: Toolkits
  - name: Files
  - name: Interactions
  - name: Usage and billing
  - name: Catalogue
  - name: Browser
  - name: Users
  - name: Groups
  - name: Builds
paths:
  /interactions/{interaction_id}/steps:
    get:
      tags:
        - Interactions
      summary: Get Interaction Steps
      description: >-
        The ordered steps of a record: skeletons by default, content with
        ``include=content``. Order is

        ``seq``, which is the record's own sequence, never a timestamp. The
        record is verified when it is

        read (``GET /interactions/{id}``), so ``trace`` here is the stored block
        without ``verified``.


        API key permission: Admin.
      operationId: get_interaction_steps_interactions__interaction_id__steps_get
      parameters:
        - name: interaction_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            title: Interaction Id
        - name: seq
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Seq
        - name: step_type
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Step Type
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: parent_seq
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Parent Seq
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: 'Repeatable: content'
            title: Include
          description: 'Repeatable: content'
        - name: content_max_bytes
          in: query
          required: false
          schema:
            type: integer
            minimum: -1
            description: Most content returned per step, in bytes; -1 returns all of it
            default: 10000
            title: Content Max Bytes
          description: Most content returned per step, in bytes; -1 returns all of it
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 200
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            type: string
            pattern: ^(asc|desc)$
            default: asc
            title: Order
        - name: env
          in: query
          required: false
          schema:
            title: Env
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepsPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StepsPage:
      properties:
        interaction:
          $ref: '#/components/schemas/StepsPageInteraction'
        data:
          items:
            $ref: '#/components/schemas/Step'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - interaction
        - data
      title: StepsPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StepsPageInteraction:
      properties:
        id:
          type: string
          title: Id
        trace:
          $ref: '#/components/schemas/TraceInfo'
      type: object
      required:
        - id
        - trace
      title: StepsPageInteraction
    Step:
      properties:
        type:
          type: string
          const: interaction_step
          title: Type
          default: interaction_step
        seq:
          type: integer
          title: Seq
        step_id:
          type: string
          title: Step Id
        parent_seq:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Seq
        depth:
          type: integer
          title: Depth
          default: 0
        step_type:
          type: string
          title: Step Type
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
        status:
          type: string
          title: Status
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        offset_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Offset Ms
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        provenance:
          type: string
          title: Provenance
          default: recorded
        model:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Model
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
        tool:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool
        delegate:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Delegate
        human_input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Human Input
        workflow:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Workflow
        error:
          anyOf:
            - $ref: '#/components/schemas/ErrorInfo'
            - type: 'null'
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        content:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Content
        content_state:
          anyOf:
            - $ref: '#/components/schemas/ContentState'
            - type: 'null'
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        cost_share_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost Share Usd
        hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Hash
        schema_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Schema Version
      type: object
      required:
        - seq
        - step_id
        - step_type
        - status
      title: Step
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TraceInfo:
      properties:
        status:
          type: string
          title: Status
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        schema_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Schema Version
        step_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Count
        digest:
          anyOf:
            - type: string
            - type: 'null'
          title: Digest
        sealed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sealed At
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        gaps:
          anyOf:
            - items:
                $ref: '#/components/schemas/TraceGap'
              type: array
            - type: 'null'
          title: Gaps
        message_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Hash
        response_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Hash
        details_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Details Hash
        input_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Hash
        output_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Hash
        erased_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Erased At
        erased_by:
          anyOf:
            - {}
            - type: 'null'
          title: Erased By
        verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Verified
        first_mismatch:
          anyOf:
            - $ref: '#/components/schemas/TraceMismatch'
            - type: 'null'
        anchor:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Anchor
      type: object
      required:
        - status
      title: TraceInfo
    ErrorInfo:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      title: ErrorInfo
    ContentState:
      properties:
        state:
          type: string
          enum:
            - available
            - unavailable
            - empty
          title: State
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Verified
      type: object
      required:
        - state
      title: ContentState
    TraceGap:
      properties:
        after_seq:
          type: integer
          title: After Seq
        reason:
          type: string
          title: Reason
      type: object
      required:
        - after_seq
        - reason
      title: TraceGap
    TraceMismatch:
      properties:
        seq:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seq
        reason:
          type: string
          title: Reason
      type: object
      required:
        - reason
      title: TraceMismatch
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The access_token returned by POST /apikeys/token for an API key's
        secret.

````

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