Skip to main content

Upload File Endpoint

POST /upload

Uploads a file to an available microVM.

Multi-node routing:

  • If session exists on another node, request is proxied to that node

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

multipart/form-data

Resolved schema:

{
"properties": {
"file": {
"type": "string",
"format": "binary",
"title": "File"
},
"remote_path": {
"type": "string",
"title": "Remote Path"
},
"session_id": {
"type": "string",
"title": "Session Id"
},
"recursive": {
"type": "boolean",
"title": "Recursive",
"default": false
},
"api_key": {
"type": "string",
"title": "Api Key"
}
},
"type": "object",
"required": [
"file",
"remote_path",
"session_id"
],
"title": "Body_upload_file_endpoint_upload_post"
}

Field details:

FieldTypeRequiredDescriptionConstraints
filestringYesformat=binary
remote_pathstringYes
session_idstringYes
recursivebooleanNodefault=false
api_keystringNo

Responses

200

Successful Response

application/json

Resolved schema:

{}

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"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"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo