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

# Publish Session As Dataset

> Materialize a playground session into a persisted Blindsight dataset, optionally enqueueing a scan.



## OpenAPI

````yaml /api-reference/openapi.json post /api/playground/sessions/{session_id}/publish
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
servers: []
security: []
paths:
  /api/playground/sessions/{session_id}/publish:
    post:
      tags:
        - playground
      summary: Publish Session As Dataset
      description: >-
        Materialize a playground session into a persisted Blindsight dataset,
        optionally enqueueing a scan.
      operationId: >-
        publish_session_as_dataset_api_playground_sessions__session_id__publish_post
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: blindsight_session
          in: cookie
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Blindsight Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishSessionDatasetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishSessionDatasetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PublishSessionDatasetRequest:
      properties:
        dataset_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Name
        target_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Column
        target_label_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Label Column
        split_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Split Column
          default: split
        generate_splits:
          type: boolean
          title: Generate Splits
          default: false
        include_train:
          type: boolean
          title: Include Train
          default: true
        include_val:
          type: boolean
          title: Include Val
          default: true
        include_test:
          type: boolean
          title: Include Test
          default: true
        train_ratio:
          type: number
          exclusiveMinimum: 0
          title: Train Ratio
          default: 0.7
        val_ratio:
          type: number
          exclusiveMinimum: 0
          title: Val Ratio
          default: 0.15
        test_ratio:
          type: number
          exclusiveMinimum: 0
          title: Test Ratio
          default: 0.15
        random_state:
          type: integer
          title: Random State
          default: 42
        path_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Path Column
        materialize_mode:
          type: string
          enum:
            - symlink
            - copy
          title: Materialize Mode
          default: symlink
        run_scan:
          type: boolean
          title: Run Scan
          default: false
        scan_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Type
        scan_params:
          anyOf:
            - type: object
            - type: 'null'
          title: Scan Params
        carry_hypotheses:
          type: boolean
          title: Carry Hypotheses
          default: false
      type: object
      title: PublishSessionDatasetRequest
    PublishSessionDatasetResponse:
      properties:
        dataset_id:
          type: string
          title: Dataset Id
        dataset_name:
          type: string
          title: Dataset Name
        dataset_dir:
          type: string
          title: Dataset Dir
        dataset_type:
          type: string
          title: Dataset Type
        split_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Split Column
        target_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Column
        target_label_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Label Column
        metadata_csv:
          anyOf:
            - type: string
            - type: 'null'
          title: Metadata Csv
        generated_files:
          items:
            type: string
          type: array
          title: Generated Files
          default: []
        linked_paths:
          type: integer
          title: Linked Paths
          default: 0
        skipped_paths:
          type: integer
          title: Skipped Paths
          default: 0
        scan_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Id
        warning:
          anyOf:
            - type: string
            - type: 'null'
          title: Warning
      type: object
      required:
        - dataset_id
        - dataset_name
        - dataset_dir
        - dataset_type
      title: PublishSessionDatasetResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````