Skip to main content

Move file to Trash

A request to move file to Trash folder.

POST /api/v1/files/{fileId}/trash HTTP/1.1

Generates Notification file move to Trash.

  1. Path parameters
ParameterDescription
fileIdThe ID of the file.
  1. Response structure

See Get file info

  1. Example request
curl 'http://localhost:8080/api/v1/files/189335146/trash' -i -X POST \
-H 'X-co-auth-token: 001217445fa7664cd075c578537e4c09'
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: 4931634a4a70744444504a7157744267
Content-Type: application/vnd.ncloudtech.cloudoffice.file+json;v=1;charset=UTF-8
Content-Length: 2508
{
"file": {
"id": "189335146",
"createdDate": "2022-04-06T15:55:26.000Z",
"creator": "testsrvdocs@tacos.devoffice.ru",
"creatorFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"creatorFirstName": "r",
"creatorLastName": "t",
"creatorMiddleName": "f",
"fileSize": "20",
"filename": "testfile.txt",
"headRevisionId": "189335147",
"lastModifyingUserId": "testsrvdocs@tacos.devoffice.ru",
"lastModifyingUserFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"lastModifyingUserFirstName": "r",
"lastModifyingUserLastName": "t",
"lastModifyingUserMiddleName": "f",
"mediaType": "text/plain",
"modifiedByMeDate": "2022-04-06T15:55:26.000Z",
"modifiedDate": "2022-04-06T15:55:26.000Z",
"oldPath": "/docs-test-main-dkmPIuFuVt/docs-test-trashFileExample-eMQI83RHAP/testfile.txt/",
"ownerFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"ownerId": "testsrvdocs@tacos.devoffice.ru",
"parentId": "88458295",
"properties": [
{
"id": "inTrash",
"key": "inTrash",
"value": "true"
},
{
"id": "sharedParent",
"key": "sharedParent",
"value": "true"
}
],
"totalSize": "20",
"checksum": "e0e102b9ff40785fac8902d8bcbf2279",
"tree": "/Trash/testfile.txt",
"ownerFirstName": "r",
"ownerLastName": "t",
"ownerMiddleName": "f",
"isVersion": false,
"originalFileIdOpt": null,
"creatorIsDeleted": false,
"editorIsDeleted": false,
"ownerIsDeleted": false,
"ownerAvatar": "a00bbb30-993e-4632-925f-152939195049",
"creatorAvatar": "a00bbb30-993e-4632-925f-152939195049",
"editorAvatar": "a00bbb30-993e-4632-925f-152939195049"
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/189335146"
},
{
"rel": "download",
"href": "http://localhost:8080/api/v1/files/189335146/content"
},
{
"rel": "import",
"href": "http://localhost:8080/api/v1/files/189335146/import"
},
{
"rel": "preview",
"href": "http://localhost:8080/api/v1/files/189335146/preview"
},
{
"rel": "link",
"href": "http://localhost:8080/link/189335146"
}
]
}