Read Container File
Streams a file's bytes from a running workload's container in 64 KiB frames, from offset for length bytes (0 means to EOF), ending with an eof frame. Reading a directory is FailedPrecondition. The target must be a RUNNING sandbox or job (FailedPrecondition otherwise); errno is mapped to a status (ENOENT NotFound, EEXIST AlreadyExists, EACCES/EPERM PermissionDenied, EROFS FailedPrecondition, ENOSPC ResourceExhausted). /.cp is hidden. Unavailable when the in-container handler is not running; Unimplemented without cluster access.
Access: namespace VIEWER or above (read) on the target's namespace. Workspace-scoped credentials (a workload's own agent key) are refused.
Authorization
BearerAuth A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC
token for humans. The key's namespace and role are pinned server-side.
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/connect+json
length <= 4096Seeked to as a signed 64-bit offset.
int64value <= 9223372036854776000validate:skip any length is accepted; 0 = to EOF
int64Response Body
application/connect+json
application/connect+json
curl -X POST "https://containers.xeonr.io/containers.api.v1.FilesystemService/ReadFile" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/connect+json" \ -d '<target/>'{
"data": "string",
"offset": "string",
"eof": true
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}Move Container File POST
Moves a file or tree within a running workload's container: a rename where possible, otherwise a non-atomic copy and unlink. Refuses to replace an existing destination unless overwrite is set. The target must be a RUNNING sandbox or job (FailedPrecondition otherwise); errno is mapped to a status (ENOENT NotFound, EEXIST AlreadyExists, EACCES/EPERM PermissionDenied, EROFS FailedPrecondition, ENOSPC ResourceExhausted). /.cp is hidden. Unavailable when the in-container handler is not running; Unimplemented without cluster access. **Access:** namespace OPERATOR or above (write) on the target's namespace. Workspace-scoped credentials (a workload's own agent key) are refused.
Remove Container File POST
Removes a file or, with recursive, a directory tree in a running workload's container. The target must be a RUNNING sandbox or job (FailedPrecondition otherwise); errno is mapped to a status (ENOENT NotFound, EEXIST AlreadyExists, EACCES/EPERM PermissionDenied, EROFS FailedPrecondition, ENOSPC ResourceExhausted). /.cp is hidden. Unavailable when the in-container handler is not running; Unimplemented without cluster access. **Access:** namespace OPERATOR or above (write) on the target's namespace. Workspace-scoped credentials (a workload's own agent key) are refused.