Move or rename
A rename: a file at to is replaced. A move to another file system (onto or off a volume, into /dev/shm) is done by copying and then removing the original, which is not one step: a reader may see to while from is still there. A refusal says in param whether it is about from or to, where the sandbox's system lets that be told. Paths are absolute. The operation is done as the user commands run as, or as user: what that user may not do is refused with 403, and what is created is that user's.
Takes files, or a token of the sandbox with files.
https://api.glac.ai/v1/sandboxes/{id}/files/moveAutorisation
Paramètres de chemin
Paramètres d’en-tête
Corps de la requêteJSONobligatoire
Returns
204
Moved.
400
The request is not one this call takes. invalid_json: the body is not a JSON object; unknown_field: the body has a field this call does not take; unknown_parameter: the query has a parameter this call does not take; invalid_field: a field or query parameter has the wrong type or is out of range; missing_path: no path; invalid_path: a path that is not absolute, or one the file system does not take; name_too_long: a name in the path is longer than the file system takes (255 bytes); moved_into_itself: to is from itself or lies beneath it; no_such_user: user is not a user of the sandbox; invalid_idempotency_key: Idempotency-Key is empty or over 255 characters.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
401
missing_api_key, invalid_api_key, expired_api_key, invalid_token.
403
The credential may not do this. token_scope: the sandbox token lacks the scope; permission_denied: the user the operation was done as may not. spend_limit_reached: the sandbox is frozen because a spend limit was reached; it sleeps, with its data, until the limit is raised.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
404
Something the request names does not exist. sandbox_not_found: no such sandbox; file_not_found: nothing at from, or the directory to is in does not exist; param says which.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
409
The state of something stands in the way. directory_not_empty: to is a directory with something in it; is_a_directory: the path is a directory; not_a_directory: something on the way is not a directory; read_only: the file system is mounted read-only; symlink_loop: the symbolic links on the way lead in a circle; file_busy: a file system is mounted at from or at to; sandbox_failed: the sandbox is failed; idempotency_key_reused: the key was used with another body; idempotency_in_progress: the first request with the key is still running.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
413
No room. disk_full: the file system to is on has no room for the copy.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
default
Any other failure, in the same shape. internal (500): the node failed; the message says no more, and the node's log has the reason under the request's id. unavailable (503, retryable): no_capacity, every network slot of the node is in use; memory_full, a machine the call has to start (made, woken, booted from its disk, resumed, rolled back, built) does not fit in the host's memory beside what the machines that run on it are promised, and nothing paused or idle could be put to sleep to make room for it (memory of the node); drive_full, the call would have a template built and the node's data drive has no room for one (drive of the node); unavailable, the node is shutting down, the sandbox was still starting after 10 minutes, or it did not answer, or it is being moved to this node (with Retry-After: 1); fenced, the node's lease fences the sandbox (Node.lease). moved (409): the sandbox was moved to another node, which to names.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.