Skip to main content

Get file revision

A request to get a file revision meta

POST /api/v1/files/{fileId}/revisions/{revId}
  1. Path parameters
ParameterDescription
fileIdId of a file
revIdId of a revision
  1. Response structure
PathTypeDescription
revisionObjectRevision object
links[]ArrayCommon hypermedia links
revision.checksumStringAn MD5 checksum for the content of the revision
revision.createdDateStringCreation date of the revision
revision.fileSizeStringSize of the revision in bytes
revision.idStringId of the revision
revision.isLastRevisionBooleanCurrent revision flag
revision.mediaTypeStringMedia type of the revision
revision.modifiedDateStringModification date of the revision
revision.titleStringTitle for the revision
revision.ownerIdStringThe file owner id
revision.ownerLoginStringLogin of the file’s owner
revision.ownerEmailStringEmail of the file’s owner
revision.ownerFirstNameStringFirst name of the file’s owner
revision.ownerLastNameStringLast name of the file’s owner
revision.ownerMiddleNameStringMiddle name of the file’s owner
revision.creatorIdStringRevision creator id
revision.creatorLoginStringLogin of revision’s creator
revision.creatorEmailStringEmail of revision’s creator
revision.creatorFirstNameStringFirst name of revision’s creator
revision.creatorMiddleNameStringMiddle name of revision’s creator
revision.creatorLastNameStringLast name of revision’s creator
revision.pinnedBooleanMark to not auto delete revision
revision.creatorIsDeletedBooleanMark creator is deleted
revision.ownerIsDeletedBooleanMark owner is deleted
revision.ownerAvatarStringOwner avatar
revision.creatorAvatarStringCreator avatar
links[].relStringLink type
links[].hrefStringLink reference
  1. Example request
curl 'http://localhost:8080/api/v1/files/189384739/revisions/189385141' -i \
-X GET \
-H 'X-co-auth-token: 1cfa7d30e3124306557461f275418f0b'
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: 34704f75614d6e6b315469463158756c
Content-Type: application/vnd.ncloudtech.cloudoffice.revision+json;v=1;charset=UTF-8
Content-Length: 1209
{
"revision": {
"id": "189385141",
"fileSize": "20",
"creatorId": "5177189d266a4862ad93b1cda2f5ac2b",
"creatorFirstName": "a",
"creatorLastName": "s",
"creatorMiddleName": "d",
"creatorLogin": "testsrvdocs@srv-one.tacos.devoffice.ru",
"creatorEmail": "testsrvdocs@srv-one.tacos.devoffice.ru",
"isLastRevision": true,
"mediaType": "text/plain",
"ownerId": "5177189d266a4862ad93b1cda2f5ac2b",
"ownerFirstName": "a",
"ownerLastName": "s",
"ownerMiddleName": "d",
"ownerLogin": "testsrvdocs@srv-one.tacos.devoffice.ru",
"ownerEmail": "testsrvdocs@srv-one.tacos.devoffice.ru",
"title": "testfile.txt",
"createdDate": "2022-04-06T15:59:52.000Z",
"modifiedDate": "2022-04-06T15:59:52.000Z",
"checksum": "e0e102b9ff40785fac8902d8bcbf2279",
"pinned": true,
"creatorIsDeleted": false,
"ownerIsDeleted": false,
"ownerAvatar": "a00bbb30-993e-4632-925f-152939195049",
"creatorAvatar": "a00bbb30-993e-4632-925f-152939195049"
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/189385141"
}
]
}