Get file revision
A request to get a file revision meta
POST /api/v1/files/{fileId}/revisions/{revId}
- Path parameters
| Parameter | Description |
|---|---|
fileId | Id of a file |
revId | Id of a revision |
- Response structure
| Path | Type | Description |
|---|---|---|
revision | Object | Revision object |
links[] | Array | Common hypermedia links |
revision.checksum | String | An MD5 checksum for the content of the revision |
revision.createdDate | String | Creation date of the revision |
revision.fileSize | String | Size of the revision in bytes |
revision.id | String | Id of the revision |
revision.isLastRevision | Boolean | Current revision flag |
revision.mediaType | String | Media type of the revision |
revision.modifiedDate | String | Modification date of the revision |
revision.title | String | Title for the revision |
revision.ownerId | String | The file owner id |
revision.ownerLogin | String | Login of the file’s owner |
revision.ownerEmail | String | Email of the file’s owner |
revision.ownerFirstName | String | First name of the file’s owner |
revision.ownerLastName | String | Last name of the file’s owner |
revision.ownerMiddleName | String | Middle name of the file’s owner |
revision.creatorId | String | Revision creator id |
revision.creatorLogin | String | Login of revision’s creator |
revision.creatorEmail | String | Email of revision’s creator |
revision.creatorFirstName | String | First name of revision’s creator |
revision.creatorMiddleName | String | Middle name of revision’s creator |
revision.creatorLastName | String | Last name of revision’s creator |
revision.pinned | Boolean | Mark to not auto delete revision |
revision.creatorIsDeleted | Boolean | Mark creator is deleted |
revision.ownerIsDeleted | Boolean | Mark owner is deleted |
revision.ownerAvatar | String | Owner avatar |
revision.creatorAvatar | String | Creator avatar |
links[].rel | String | Link type |
links[].href | String | Link reference |
- Example request
curl 'http://localhost:8080/api/v1/files/189384739/revisions/189385141' -i \
-X GET \
-H 'X-co-auth-token: 1cfa7d30e3124306557461f275418f0b'
- 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"
}
]
}