Experimental
Move renames or moves a path.
/v1/files/move 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
No parameters are declared.
Request and responses
Request
application/json
Schema:
FilesMoveRequest
Response
200
application/json
Schema:
FilesMoveResponse
Response
409
The path resolves through a symlink that does not resolve to a target inside the sandbox jail.
The path names an existing socket, FIFO, device, or other non-regular object where a regular file is required.
from names a regular file and to an existing directory, which Move refuses rather than moving the file into it.
from names a directory and to an existing path, which Move refuses rather than replacing.
from and to are on different filesystems, and Move never copies the contents to cross the boundary.
application/json
Schema:
Error
move_crosses_filesystem
{
"code": "failedPrecondition",
"message": "move_crosses_filesystem: `from` and `to` are on different filesystems, and `Move` never copies the contents to cross the boundary."
}move_destination_is_directory
{
"code": "failedPrecondition",
"message": "move_destination_is_directory: `from` names a regular file and `to` an existing directory, which `Move` refuses rather than moving the file into it."
}move_destination_occupied
{
"code": "failedPrecondition",
"message": "move_destination_occupied: `from` names a directory and `to` an existing path, which `Move` refuses rather than replacing."
}path_authority_nonregular_object
{
"code": "failedPrecondition",
"message": "path_authority_nonregular_object: The path names an existing socket, FIFO, device, or other non-regular object where a regular file is required."
}path_authority_symlink_escape
{
"code": "failedPrecondition",
"message": "path_authority_symlink_escape: The path resolves through a symlink that does not resolve to a target inside the sandbox jail."
}Response
default
application/json
Schema:
Error
Schema example
{
"code": "notFound",
"details": [],
"message": "sandbox not found"
}Referenced schemas
#/components/schemas/FilesMoveRequest
#/components/schemas/FilesMoveResponse
Complete operation contract
{
"description": "Move renames or moves a path. The destination is exact: an existing regular\nfile is replaced, the source basename is never appended, and a directory\ndestination is refused unchanged. A source or destination that leaves the jail\nthrough a symlink refuses with FAILED_PRECONDITION and a error reason.",
"operationId": "move",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FilesMoveRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FilesMoveResponse"
}
}
},
"description": "Success"
},
"409": {
"content": {
"application/json": {
"examples": {
"move_crosses_filesystem": {
"summary": "`from` and `to` are on different filesystems, and `Move` never copies the contents to cross the boundary.",
"value": {
"code": "failedPrecondition",
"message": "move_crosses_filesystem: `from` and `to` are on different filesystems, and `Move` never copies the contents to cross the boundary."
}
},
"move_destination_is_directory": {
"summary": "`from` names a regular file and `to` an existing directory, which `Move` refuses rather than moving the file into it.",
"value": {
"code": "failedPrecondition",
"message": "move_destination_is_directory: `from` names a regular file and `to` an existing directory, which `Move` refuses rather than moving the file into it."
}
},
"move_destination_occupied": {
"summary": "`from` names a directory and `to` an existing path, which `Move` refuses rather than replacing.",
"value": {
"code": "failedPrecondition",
"message": "move_destination_occupied: `from` names a directory and `to` an existing path, which `Move` refuses rather than replacing."
}
},
"path_authority_nonregular_object": {
"summary": "The path names an existing socket, FIFO, device, or other non-regular object where a regular file is required.",
"value": {
"code": "failedPrecondition",
"message": "path_authority_nonregular_object: The path names an existing socket, FIFO, device, or other non-regular object where a regular file is required."
}
},
"path_authority_symlink_escape": {
"summary": "The path resolves through a symlink that does not resolve to a target inside the sandbox jail.",
"value": {
"code": "failedPrecondition",
"message": "path_authority_symlink_escape: The path resolves through a symlink that does not resolve to a target inside the sandbox jail."
}
}
},
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "The path resolves through a symlink that does not resolve to a target inside the sandbox jail.\n\nThe path names an existing socket, FIFO, device, or other non-regular object where a regular file is required.\n\n`from` names a regular file and `to` an existing directory, which `Move` refuses rather than moving the file into it.\n\n`from` names a directory and `to` an existing path, which `Move` refuses rather than replacing.\n\n`from` and `to` are on different filesystems, and `Move` never copies the contents to cross the boundary."
},
"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": "Move renames or moves a path.",
"tags": [
"Files"
],
"x-sbx-authenticated-only": false,
"x-sbx-conditional-permissions": [],
"x-sbx-error-responses": [
{
"code": "FAILED_PRECONDITION",
"description": "The path resolves through a symlink that does not resolve to a target inside the sandbox jail.",
"reason": "path_authority_symlink_escape"
},
{
"code": "FAILED_PRECONDITION",
"description": "The path names an existing socket, FIFO, device, or other non-regular object where a regular file is required.",
"reason": "path_authority_nonregular_object"
},
{
"code": "FAILED_PRECONDITION",
"description": "`from` names a regular file and `to` an existing directory, which `Move` refuses rather than moving the file into it.",
"reason": "move_destination_is_directory"
},
{
"code": "FAILED_PRECONDITION",
"description": "`from` names a directory and `to` an existing path, which `Move` refuses rather than replacing.",
"reason": "move_destination_occupied"
},
{
"code": "FAILED_PRECONDITION",
"description": "`from` and `to` are on different filesystems, and `Move` never copies the contents to cross the boundary.",
"reason": "move_crosses_filesystem"
}
],
"x-sbx-plane": "data",
"x-sbx-required-permissions": [
"sandboxesFilesWrite"
],
"x-sbx-serving-surface": "sandboxEndpoint"
}