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

# Apply session configuration

> Initializes a new session or updates an existing session's configuration at runtime, including its workflow definitions



## OpenAPI

````yaml /api/openapi.json post /api/sessions
openapi: 3.1.0
info:
  title: Yukta REST API
  version: 0.0.1-SNAPSHOT
  description: >-
    Create sessions and workflows, start and steer executions, and read their
    status, logs and results. Pre-beta: paths and schemas may change before
    v0.1.0.
servers:
  - url: http://localhost:8080
    description: Local server (default address)
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Supervisors API
    description: Supervisors and control planes on the control bus
  - name: Workflow Versions API
    description: List the saved versions and roll back
  - name: Workflow API
    description: Endpoints for starting workflows and listing their executions
  - name: Execution API
    description: Stop, restart and observe workflow executions
  - name: Execution Search API
    description: Find runs across sessions
  - name: Control Bus & Observability API
    description: >-
      Endpoints for control bus operations, node management, and execution
      observability
  - name: Execution Control API
    description: Pause, resume, step and stop nodes
  - name: Session API
    description: Endpoints for session and workflow discovery, configuration management
  - name: Session API
    description: Validate a draft workflow without saving it
  - name: Workers API
    description: Workers connected to the control plane
  - name: Events API
    description: Live feed of execution events
  - name: Workflow Details API
    description: Workflow DAG graph with plugin metadata and per-workflow execution history
  - name: Execution Results API
    description: Follow the result of an execution
  - name: Execution Logs API
    description: Stream execution logs
  - name: Control audit API
    description: Control commands and who sent them
  - name: Plugin API
    description: Endpoints for discovering workflow plugins
paths:
  /api/sessions:
    post:
      tags:
        - Session API
      summary: Apply session configuration
      description: >-
        Initializes a new session or updates an existing session's configuration
        at runtime, including its workflow definitions
      operationId: applyConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiResponseVoid'
components:
  schemas:
    ConfigRequest:
      type: object
      description: >-
        Request object for session configuration, supporting both initialization
        and runtime updates
      properties:
        sessionId:
          type: string
          description: The unique session identifier used to track this context
          example: session-123
          maxLength: 256
          minLength: 0
          pattern: ^(?!.*\.\.)[^/\\]*$
        name:
          type: string
          description: A human-readable name for the session
          example: Production ETL v4
          maxLength: 256
          minLength: 0
        description:
          type: string
          description: A human-readable description of the session
          example: Daily build and quality check
          maxLength: 256
          minLength: 0
        initiator:
          type: string
          description: The name of the initiator (user or system)
          example: AI Agent
          minLength: 1
        tags:
          type: object
          additionalProperties:
            type: string
          description: Metadata tags for categorization and filtering
          example:
            environment: prod
            client: mobile-app
        projectPath:
          type: string
          description: The absolute root path of the project on the server's filesystem
          example: /home/user/workspace/project-alpha
          maxLength: 1024
          minLength: 0
        workflows:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/WorkflowDefinitionRequest'
          description: A map of workflow definition requests keyed by workflow ID
          minProperties: 1
      required:
        - description
        - initiator
        - name
        - projectPath
        - sessionId
        - workflows
    ApiResponseVoid:
      type: object
      description: >-
        Unified API response wrapper for both success and error responses.
        Success responses include data field; error responses include error,
        path, and errors fields.
      properties:
        timestamp:
          type: string
          format: date-time
          description: The time the response was generated
        status:
          type: integer
          format: int32
          description: The HTTP status code
          example: 200
        message:
          type: string
          description: A human-readable message
          example: Operation successful
        data:
          description: The response data
        error:
          type: string
          description: The HTTP status error name
          example: Bad Request
        path:
          type: string
          description: The request path
          example: /api/files
        errors:
          type: array
          description: The list of field validation errors
          items:
            $ref: '#/components/schemas/FieldError'
    WorkflowDefinitionRequest:
      type: object
      description: Definition of a reactive workflow DAG
      properties:
        workflowId:
          type: string
          description: Unique workflow identifier
          minLength: 1
        description:
          type: string
          description: A human-readable description of the workflow
          example: Quality check
          maxLength: 256
          minLength: 0
        nodes:
          type: array
          description: Nodes in the workflow
          items:
            $ref: '#/components/schemas/NodeRequest'
          minItems: 1
        edges:
          type: array
          description: Edges connecting the nodes
          items:
            $ref: '#/components/schemas/EdgeRequest'
      required:
        - description
        - edges
        - nodes
        - workflowId
    FieldError:
      type: object
      description: Field-specific validation error detail
      properties:
        field:
          type: string
          description: The name of the field that failed validation
          example: sessionId
        message:
          type: string
          description: The validation error message explaining the failure
          example: 'Session not found: ''unknown-session'''
    NodeRequest:
      type: object
      description: A single node in the workflow DAG
      properties:
        nodeId:
          type: string
          description: Unique ID for the node
          minLength: 1
        type:
          type: string
          description: Plugin type
          minLength: 1
        config:
          type: object
          additionalProperties: {}
          description: Plugin configuration
      required:
        - nodeId
        - type
    EdgeRequest:
      type: object
      description: A connection between two nodes
      properties:
        source:
          type: string
          description: Source node ID
          minLength: 1
        target:
          type: string
          description: Target node ID
          minLength: 1
        sourcePort:
          type: string
          description: Source port name (optional; omit to route all messages)
      required:
        - source
        - target
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key sent as `Authorization: Bearer <key>`. Needed only when the
        server has a key configured.
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: The same API key sent as `X-API-Key`.

````

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