Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,84 @@
}
}
},
"/api/sandboxes/files": {
"post": {
"description": "Upload one or more files to the authenticated account's GitHub org submodule repository. Resolves the target path through git submodules (e.g. `.openclaw/workspace/orgs/myorg/`) and commits each file directly to GitHub. Authentication is handled via the x-api-key header or Authorization Bearer token.",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": ["files", "folder"],
"properties": {
"files": {
"type": "array",
"items": { "type": "string", "format": "binary" },
"description": "One or more files to upload."
},
"folder": {
"type": "string",
"description": "Target folder path within the repository (e.g. `.openclaw/workspace/orgs/myorg`).",
"example": ".openclaw/workspace/orgs/myorg"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Files uploaded successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": { "type": "string", "example": "success" },
"uploaded": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string", "description": "File path in the repository." },
"success": { "type": "boolean" },
"error": { "type": "string" }
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request - missing folder or no files provided",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SandboxErrorResponse" }
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SandboxErrorResponse" }
}
}
},
"404": {
"description": "Not found - no snapshot or GitHub repository for account",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SandboxErrorResponse" }
}
}
}
}
}
},
"/api/x/search": {
"get": {
"servers": [
Expand Down
4 changes: 4 additions & 0 deletions api-reference/sandboxes/upload.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Upload Files'
openapi: 'POST /api/sandboxes/files'
---
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@
"api-reference/sandboxes/snapshot",
"api-reference/sandboxes/delete",
"api-reference/sandboxes/setup",
"api-reference/sandboxes/file"
"api-reference/sandboxes/file",
"api-reference/sandboxes/upload"
]
},
{
Expand Down