Skip to main content

Get file info

A request to get all file’s metadata and properties.

POST /api/v1/files/{fileId} HTTP/1.1
  1. Path parameters
ParameterDescription
fileIdThe ID of the file.
  1. Request parameters
ParameterDescription
withHasSubFolderIf flag is true, send hasChildFolders property in response. By default is true. hasChildFolders is true when file has sub folder(s), otherwise false
RelationDescription
SelfA self-reference link to this file.
EditA link to open this file for viewing or editing.
exportExport URL(s) for the file.
importImport URL(s) for the file. See Import file
downloadDownload URL for the file. See Get file content. Valid for non-convered files only.
previewA link to the file’s thumbnail. See Get file preview
prerenderA link to prerendered file content.
viewA link to file’s content for audio/video/image/pdf files.
thumbnailA link to image’s thumbnail.
linkA link by which file may be referenced.

Table 2: File links

  1. Example request
curl 'http://localhost:8080/api/v1/files/189358688' -i -X GET \
-H 'X-co-auth-token: 9c2130c1fdc03892f9791959b005f263'
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: 796778526c76774f7475573562474d62
Content-Type: application/vnd.ncloudtech.cloudoffice.file+json;v=1;charset=UTF-8
Content-Length: 3311
{
"file": {
"id": "189358688",
"createdDate": "2022-04-06T15:57:38.000Z",
"creator": "testsrvdocs@tacos.devoffice.ru",
"creatorFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"creatorFirstName": "r",
"creatorLastName": "t",
"creatorMiddleName": "f",
"currentRevisionObject": {
"id": "189358689",
"fileSize": "20",
"creatorId": "5177189d266a4862ad93b1cda2f5ac2b",
"creatorFirstName": "r",
"creatorLastName": "t",
"creatorMiddleName": "f",
"creatorLogin": "testsrvdocs@srv-one.tacos.devoffice.ru",
"creatorEmail": "testsrvdocs@srv-one.tacos.devoffice.ru",
"isLastRevision": true,
"mediaType": "text/plain",
"ownerId": "5177189d266a4862ad93b1cda2f5ac2b",
"ownerFirstName": "r",
"ownerLastName": "t",
"ownerMiddleName": "f",
"ownerLogin": "testsrvdocs@srv-one.tacos.devoffice.ru",
"ownerEmail": "testsrvdocs@srv-one.tacos.devoffice.ru",
"title": "",
"createdDate": "2022-04-06T15:57:38.000Z",
"modifiedDate": "2022-04-06T15:57:38.000Z",
"checksum": "e0e102b9ff40785fac8902d8bcbf2279",
"pinned": true,
"creatorIsDeleted": false,
"ownerIsDeleted": false,
"ownerAvatar": "a00bbb30-993e-4632-925f-152939195049",
"creatorAvatar": "a00bbb30-993e-4632-925f-152939195049"
},
"fileSize": "20",
"filename": "testfile.txt",
"headRevisionId": "189358689",
"lastModifyingUserId": "testsrvdocs@tacos.devoffice.ru",
"lastModifyingUserFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"lastModifyingUserFirstName": "r",
"lastModifyingUserLastName": "t",
"lastModifyingUserMiddleName": "f",
"mediaType": "text/plain",
"modifiedByMeDate": "2022-04-06T15:57:38.000Z",
"modifiedDate": "2022-04-06T15:57:38.000Z",
"ownerFsId": "5177189d266a4862ad93b1cda2f5ac2b",
"ownerId": "testsrvdocs@tacos.devoffice.ru",
"parentId": "189358623",
"properties": [],
"totalSize": "20",
"checksum": "e0e102b9ff40785fac8902d8bcbf2279",
"tree": "/docs-test-getFileExample()-jKnIvl1kAM/testfile.txt",
"ownerFirstName": "r",
"ownerLastName": "t",
"ownerMiddleName": "f",
"isVersion": false,
"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/189358688"
},
{
"rel": "download",
"href": "http://localhost:8080/api/v1/files/189358688/content"
},
{
"rel": "import",
"href": "http://localhost:8080/api/v1/files/189358688/import"
},
{
"rel": "preview",
"href": "http://localhost:8080/api/v1/files/189358688/preview"
},
{
"rel": "link",
"href": "http://localhost:8080/link/189358688"
}
]
}
RelationDescription
selfA self-reference link to this file.
editA link to open this file for viewing or editing.
exportExport URL(s) for the file.
importImport URL(s) for the file. See Import file
downloadDownload URL for the file. See Get file content. Valid for non-convered files only.
previewA link to the file’s thumbnail. See Get file preview
prerenderA link to prerendered file content.
viewA link to file’s content for audio/video/image/pdf files.
thumbnailA link to image’s thumbnail.
linkA link by which file may be referenced.

Table 3: something table