Experimental
ReadFile returns raw file content over HTTP; Stat exposes file metadata.
/v1/files/content Connection and access
API connection and authentication guidance
{endpoint}
endpoint: The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control.
Use one of these alternatives. Requirements within an alternative apply together.
sandboxBearer
Parameters
path
query
Required
Type:
string
All schema constraints and annotations
{
"minLength": 1,
"title": "path",
"type": "string"
}Request and responses
Response
200
application/octet-stream
Headers
Content-LengthExact byte count of the complete file; this response does not use chunked transfer encoding.
{
"description": "Exact byte count of the complete file; this response does not use chunked transfer encoding.",
"required": true,
"schema": {
"minimum": 0,
"type": "integer"
}
}All schema constraints and annotations
{
"contentMediaType": "application/octet-stream"
}Response
default
application/json
Schema:
Error
Schema example
{
"code": "notFound",
"details": [],
"message": "sandbox not found"
}Referenced schemas
#/components/schemas/FilesReadFileRequest
#/components/schemas/FilesReadFileResponse
Complete operation contract
{
"description": "ReadFile returns raw file content over HTTP; Stat exposes file metadata.\nContent above the unary message cap is refused, never truncated.",
"operationId": "readFile",
"parameters": [
{
"description": "path is the sandbox path of a regular file.",
"in": "query",
"name": "path",
"required": true,
"schema": {
"minLength": 1,
"title": "path",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"contentMediaType": "application/octet-stream"
}
}
},
"description": "Success",
"headers": {
"Content-Length": {
"description": "Exact byte count of the complete file; this response does not use chunked transfer encoding.",
"required": true,
"schema": {
"minimum": 0,
"type": "integer"
}
}
}
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "The structured Error body identifies the failure with a stable code and optional typed details."
}
},
"security": [
{
"sandboxBearer": []
}
],
"servers": [
{
"url": "{endpoint}",
"variables": {
"endpoint": {
"default": "https://sandbox.invalid",
"description": "The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control."
}
}
}
],
"summary": "ReadFile returns raw file content over HTTP; Stat exposes file metadata.",
"tags": [
"Files"
],
"x-sbx-authenticated-only": false,
"x-sbx-conditional-permissions": [],
"x-sbx-http-transfer": {
"response": {
"bytesField": "data",
"mediaType": "application/octet-stream"
}
},
"x-sbx-plane": "data",
"x-sbx-request-schema": {
"$ref": "#/components/schemas/FilesReadFileRequest"
},
"x-sbx-required-permissions": [
"sandboxesFilesRead"
],
"x-sbx-response-schema": {
"$ref": "#/components/schemas/FilesReadFileResponse"
},
"x-sbx-serving-surface": "sandboxEndpoint"
}