Initialized files are moved to a new directory.
If a file is uploaded but not initialized, it is saved to the directory. It is assigned the specified name. If there is a file with the same name in the directory, a postfix with a number will be added, for example, (1).

Request

POST /pub/v1/disk/file/move

Query parameters

Parameter name Value Description Additional
directoryID uuid

ID of the directory that the file is moved to

Required

Request body

The resource sent in the request body is  Moving a file to a directory — Request. It contains the following writable properties:

{
    "files": [
        {
            "hash": "uuid",
            "name": "string"
        }
    ]
}

Properties

Name Type Description Additional
files[] array

Files to move

Optional
files[].hash uuid

File ID

Optional
files[].name string

File name

Optional

Authorization

This request requires the use of one of following authorisation methods: API key

Response

The following HTTP status codes may be returned:

Status code Description Resource
200 OK

Operation completed successfully

402 Payment Required

Not enough disk space

403 Forbidden

Not enough permissions to create a file

409 Conflict

Unable to create a unique name for the file

default

Server response sent when the file is moved to the specified directory

Server response sent when the file is moved to the specified directory (Moving a file to a directory)