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

# Initialize onedrive sandbox with data

> Initialize the sandbox with onedrive-specific data following the defined schema.



## OpenAPI

````yaml post /sandbox/onedrive/{sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /sandbox/onedrive/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize onedrive sandbox with data
      description: >-
        Initialize the sandbox with onedrive-specific data following the defined
        schema.
      operationId: initialize_sandbox_sandbox_onedrive__sandbox_id__initialize_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The unique sandbox identifier
            title: Sandbox Id
          description: The unique sandbox identifier
        - name: init_default_data
          in: query
          required: false
          schema:
            type: boolean
            description: If true, use default test data for initialization
            default: false
            title: Init Default Data
          description: If true, use default test data for initialization
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/OneDriveData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  root:
                    - name: root
                      folders:
                        - name: Documents
                          files:
                            - name: readme.txt
                              content: >-
                                Welcome to the Documents folder. This contains
                                important project documentation.
                            - name: notes.txt
                              content: |-
                                Meeting notes from January 2024.
                                - Discussed Q1 goals
                                - Reviewed project timeline
                          folders:
                            - name: Projects
                              files:
                                - name: project_summary.txt
                                  content: |-
                                    Project Alpha Summary
                                    Status: In Progress
                                    Deadline: March 2024
                              folders:
                                - name: ProjectAlpha
                                  files:
                                    - name: requirements.txt
                                      content: |-
                                        Project Alpha Requirements:
                                        1. User authentication
                                        2. Dashboard implementation
                                        3. API integration
                                    - name: tasks.txt
                                      content: |-
                                        TODO:
                                        - Complete backend API
                                        - Design frontend mockups
                                        - Write unit tests
                                  folders: []
                        - name: Work
                          files:
                            - name: schedule.txt
                              content: |-
                                Work Schedule - Week of Jan 15
                                Monday: Team meeting 10am
                                Wednesday: Client presentation 2pm
                                Friday: Sprint review 3pm
                          folders:
                            - name: Reports
                              files:
                                - name: weekly_report.txt
                                  content: |-
                                    Weekly Report - Week 3
                                    Completed: 8 tasks
                                    In Progress: 3 tasks
                                    Blocked: 1 task
                              folders:
                                - name: Q1_2024
                                  files:
                                    - name: january.txt
                                      content: |-
                                        January Report:
                                        Revenue: $50,000
                                        New Clients: 5
                                        Projects Completed: 3
                                    - name: february.txt
                                      content: |-
                                        February Report:
                                        Revenue: $55,000
                                        New Clients: 7
                                        Projects Completed: 4
                                  folders: []
                      files:
                        - name: welcome.txt
                          content: |-
                            Welcome to your OneDrive!
                            This is your personal cloud storage space.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    OneDriveData-Input:
      properties:
        root:
          items:
            $ref: '#/components/schemas/OneDriveFolder-Input'
          type: array
          title: Root
          description: List containing root folder (should contain only one element)
      type: object
      required:
        - root
      title: OneDriveData
      description: Complete OneDrive sandbox data structure
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OneDriveFolder-Input:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Folder ID (read-only, set by OneDrive)
        name:
          type: string
          title: Name
          description: Folder name
        folders:
          anyOf:
            - items:
                $ref: '#/components/schemas/OneDriveFolder-Input'
              type: array
            - type: 'null'
          title: Folders
          description: List of subfolders
        files:
          anyOf:
            - items:
                $ref: '#/components/schemas/OneDriveFile'
              type: array
            - type: 'null'
          title: Files
          description: List of files in the folder
      type: object
      required:
        - name
      title: OneDriveFolder
      description: OneDrive Folder object
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    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
    OneDriveFile:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: File ID (read-only, set by OneDrive)
        name:
          type: string
          title: Name
          description: File name
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: File content (text files only)
      type: object
      required:
        - name
      title: OneDriveFile
      description: OneDrive File object
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````