Skip to main content

Get file public link’s properties

Заметка

[Since 2021.03]

A request to get the publicly shared file’s properties (limited set).

POST /api/v1/public/{linkUid} HTTP/1.1
  1. Path parameters
ParameterDescription
linkUidThe UID of the link for the file
  1. Response structure
PathTypeDescription
fileObjectFile object metadata
linksArrayArray of links to file object. See File Links
file.idStringThe ID of the file
file.filenameStringThe name of the file
file.mediaTypeStringThe media type of the file
file.publicLinkObjectThe public link properties of the file
file.fileSizeStringThe size of the file in bytes
file.modifiedDateDateLast time this file was modified by anyone (formatted RFC 3339 timestamp)
file.propertiesArrayThe list of file’s properties
file.publicLinkIdStringPublic link id. [Since 2021.03]
file.totalSizeStringTotal size of all file’s versions
file.createdDateDateCreate time for this file (formatted ISO8601 timestamp)
file.properties[].idStringThe file’s property id
file.properties[].keyStringThe file’s property key
file.properties[].valueStringThe file’s property value
file.publicLink.typeStringType of public links
links[].relStringLink type
links[].hrefStringLink reference
  1. Example request
curl 'http://localhost:8080/api/v1/public/ade7d543-19b8-40cd-8ded-0939007231be' -i -X GET \
-H 'X-co-auth-token: 6a0733488f9fd5b4754b7744e85391bd'
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: 4b646f437364353974686c4858633971
Content-Type: application/vnd.ncloudtech.cloudoffice.file+json;v=1;charset=UTF-8
Content-Length: 833
{
"file": {
"id": "189355212",
"mediaType": "text/plain",
"publicLink": {
"type": "main"
},
"filename": "testfile.txt",
"propereties": [
{
"id": "link-with-password",
"key": "link-with-password",
"value": "true"
},
{
"id": "shared-by-link",
"key": "shared-by-link",
"value": "true"
},
{
"id": "sharedParent",
"key": "sharedParent",
"value": "true"
}
],
"publicLinkId": "56766537657356756-f43645",
"fileSize": "20",
"totalSize": "20",
"modifiedDate": "2024-01-28T22:01:14.00Z",
"crteatedDate": "2024-01-28T22:01:14.00Z",
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/public/ade7d543-19b8-40cd-8ded-0939007231be"
}
]
}
}