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

# List playground sessions for a workflow

> Retrieve all playground sessions associated with a workflow.
Sessions are used to test and interact with workflows in an isolated environment.




## OpenAPI

````yaml /api-reference/openapi.yaml get /workflows/{id}/playground/sessions
openapi: 3.0.3
info:
  title: FlowDrop™ API
  description: >
    FlowDrop is a visual workflow editor for AI applications and data processing
    pipelines.

    This API provides comprehensive endpoints for managing workflows, node
    types, pipeline execution, and port configuration.


    ## Features

    - **Workflow Management**: Complete CRUD operations for workflows with nodes
    and edges

    - **Node Type Discovery**: Browse and search available node processors with
    metadata

    - **Pipeline Execution**: Execute workflows with real-time status tracking
    and job management

    - **Port Configuration**: Dynamic port compatibility system with data type
    management

    - **Real-time Updates**: Track node execution status and pipeline progress

    - **Import/Export**: Import and export workflows in JSON format

    - **Validation**: Workflow validation before execution

    - **Agent Spec Integration**: Import/export Oracle Open Agent Spec flows and
    execute on compatible runtimes (WayFlow/PyAgentSpec)


    ## Architecture

    - **Frontend**: Svelte 5 + XYFlow for visual workflow editing

    - **Backend**: Drupal 10/11 with custom node processor plugins

    - **API**: RESTful JSON API with consistent response format

    - **Storage**: Drupal entity system with workflow versioning


    ## Authentication

    API endpoints require Drupal authentication. Use Bearer token or
    session-based authentication.


    ## Rate Limiting

    - Node Discovery: 100 requests/minute

    - Workflow Operations: 50 requests/minute

    - Pipeline Execution: 20 requests/minute


    ## Error Handling

    All errors return a consistent format with success flag, error message, and
    optional details.
  version: 1.0.0
  contact:
    name: FlowDrop Support
    email: shibinkidd@gmail.com
    url: https://www.drupal.org/project/issues/flowdrop?categories=All
servers:
  - url: http://localhost:5173/api/flowdrop
    description: Local development server (Svelte)
  - url: https://flowdrop.ddev.site/api/flowdrop
    description: Local Drupal server
security:
  - BearerAuth: []
  - SessionAuth: []
tags:
  - name: System
    description: System health and status endpoints
  - name: Node Types
    description: Node type discovery and metadata endpoints
  - name: Configuration
    description: System configuration endpoints including port configuration
  - name: Workflows
    description: Workflow CRUD operations
  - name: Pipeline
    description: Pipeline execution and monitoring
  - name: Playground
    description: Interactive workflow testing and chat interface
  - name: Interrupts
    description: |
      Human-in-the-Loop (HITL) interrupt endpoints for workflow interactions.
      Interrupts allow workflows to pause execution and request user input.
  - name: Validation
    description: Workflow validation
  - name: Import/Export
    description: Workflow import and export operations
  - name: Chat
    description: |
      LLM Chat Interface for natural language workflow building.
      Translates user intent into DSL commands via a backend LLM integration.
  - name: Agent Spec
    description: >
      Oracle Open Agent Spec integration endpoints.

      Provides bidirectional conversion between FlowDrop workflows and Agent
      Spec format,

      plus runtime execution on compatible runtimes (WayFlow, PyAgentSpec).

      @see https://github.com/oracle/agent-spec
paths:
  /workflows/{id}/playground/sessions:
    get:
      tags:
        - Playground
      summary: List playground sessions for a workflow
      description: >
        Retrieve all playground sessions associated with a workflow.

        Sessions are used to test and interact with workflows in an isolated
        environment.
      operationId: listPlaygroundSessions
      parameters:
        - name: id
          in: path
          description: Workflow UUID
          required: true
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: Maximum number of sessions to return
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          description: Number of sessions to skip
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: List of playground sessions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaygroundSessionsResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    PlaygroundSessionsResponse:
      allOf:
        - $ref: '#/components/schemas/ApiResponse'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/PlaygroundSession'
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the request was successful
        data:
          description: Response data (type varies by endpoint)
        message:
          type: string
          description: Response message
        error:
          type: string
          description: Error message (if any)
    PlaygroundSession:
      type: object
      description: >
        A playground session represents an isolated test environment for a
        workflow.

        Sessions maintain conversation history and allow interactive testing.
      properties:
        id:
          type: string
          format: uuid
          description: Session unique identifier
        workflowId:
          type: string
          format: uuid
          description: Associated workflow ID
        name:
          type: string
          description: Session display name
          example: Test Session 1
        status:
          $ref: '#/components/schemas/PlaygroundSessionStatus'
        createdAt:
          type: string
          format: date-time
          description: Session creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Last activity timestamp
        executions:
          type: array
          description: >
            Main pipeline runs triggered within this session, ordered
            oldest-first.

            Sub-flow (nested) executions are intentionally excluded — they are

            surfaced only on individual messages via `parentPipelineId`. Clients
            rely

            on this list being main-runs-only to populate the run-switcher.
          items:
            $ref: '#/components/schemas/PlaygroundExecution'
          nullable: true
        metadata:
          type: object
          additionalProperties: true
          description: Custom session metadata
      required:
        - id
        - workflowId
        - name
        - status
        - createdAt
        - updatedAt
    ErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ApiResponse'
        - type: object
          properties:
            success:
              type: boolean
              example: false
            error:
              type: string
              description: Error message
            code:
              type: string
              description: Error code
            details:
              type: object
              description: Additional error details
    PlaygroundSessionStatus:
      type: string
      enum:
        - idle
        - running
        - awaiting_input
        - completed
        - failed
      description: Current status of a playground session
    PlaygroundExecution:
      type: object
      description: A single pipeline execution associated with a playground session
      properties:
        id:
          type: string
          description: Pipeline/execution ID
        startedAt:
          type: string
          format: date-time
          description: When the execution started
        status:
          type: string
          enum:
            - running
            - completed
            - failed
          description: Current execution status
      required:
        - id
        - startedAt
        - status
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: Resource not found
            code: NOT_FOUND
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: Internal server error
            code: INTERNAL_ERROR
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authentication
    SessionAuth:
      type: apiKey
      in: cookie
      name: SESS
      description: Drupal session cookie

````