Skip to main content
POST
/
sandbox
/
onedrive
/
{sandbox_id}
/
initialize
Initialize onedrive sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/onedrive/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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.\n- Discussed Q1 goals\n- Reviewed project timeline"
            }
          ],
          "folders": [
            {
              "name": "Projects",
              "files": [
                {
                  "name": "project_summary.txt",
                  "content": "Project Alpha Summary\nStatus: In Progress\nDeadline: March 2024"
                }
              ],
              "folders": [
                {
                  "name": "ProjectAlpha",
                  "files": [
                    {
                      "name": "requirements.txt",
                      "content": "Project Alpha Requirements:\n1. User authentication\n2. Dashboard implementation\n3. API integration"
                    },
                    {
                      "name": "tasks.txt",
                      "content": "TODO:\n- Complete backend API\n- Design frontend mockups\n- Write unit tests"
                    }
                  ],
                  "folders": []
                }
              ]
            }
          ]
        },
        {
          "name": "Work",
          "files": [
            {
              "name": "schedule.txt",
              "content": "Work Schedule - Week of Jan 15\nMonday: Team meeting 10am\nWednesday: Client presentation 2pm\nFriday: Sprint review 3pm"
            }
          ],
          "folders": [
            {
              "name": "Reports",
              "files": [
                {
                  "name": "weekly_report.txt",
                  "content": "Weekly Report - Week 3\nCompleted: 8 tasks\nIn Progress: 3 tasks\nBlocked: 1 task"
                }
              ],
              "folders": [
                {
                  "name": "Q1_2024",
                  "files": [
                    {
                      "name": "january.txt",
                      "content": "January Report:\nRevenue: $50,000\nNew Clients: 5\nProjects Completed: 3"
                    },
                    {
                      "name": "february.txt",
                      "content": "February Report:\nRevenue: $55,000\nNew Clients: 7\nProjects Completed: 4"
                    }
                  ],
                  "folders": []
                }
              ]
            }
          ]
        }
      ],
      "files": [
        {
          "name": "welcome.txt",
          "content": "Welcome to your OneDrive!\nThis is your personal cloud storage space."
        }
      ]
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete OneDrive sandbox data structure

root
OneDriveFolder · object[]
required

List containing root folder (should contain only one element)

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type