Skip to content
Subako Docs
English
Esc
↑↓navigate↵open⌘Jpreview

Upload a volume file

Creates the file and its parent directories, or replaces the file.

PUT/v1/sessions/{session_id}/volume/{area}/{path}
Authorization
AuthorizationBearer token · headerrequired
Path parameters
session_idstring<uuid>required
Session id
areaVolumeAreaParamrequired
The area the file sits in.
Allowed:tmpdata
pathstringrequired
The file's path in the area, e.g. `notes/a.txt`.
Request body
requiredapplication/octet-stream
The file's bytes, at most 1 GiB.
string<binary>
Responses
200The file as written.
bytesinteger<int64>required
min 0
pathstringrequired
The file's path in the area.
400Malformed path parameter, the data area where the root agent does not enable it, a path the volume cannot hold, or a body over 1 GiB.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403A workspace credential lacking session.manage, an organization suspended or out of credit, or a volume its last hourly measurement found at or over its 10 GiB quota; reads and deletes still work, and writes resume once a measurement finds it under. A session token may act only on its own session and never lands here.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such session, or the caller cannot see it, or the tree has no function grant, or the deployment runs no functions.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/octet-stream
Request
curl -X PUT "https://api.us.cloud.subako.ai/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/volume/tmp/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/octet-stream" \
  -d '"string"'
Response
{
  "bytes": 0,
  "path": "string"
}