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
- Path parameters
| Parameter | Description |
|---|---|
linkUid | The UID of the link for the file |
- Response structure
| Path | Type | Description |
|---|---|---|
file | Object | File object metadata |
links | Array | Array of links to file object. See File Links |
file.id | String | The ID of the file |
file.filename | String | The name of the file |
file.mediaType | String | The media type of the file |
file.publicLink | Object | The public link properties of the file |
file.fileSize | String | The size of the file in bytes |
file.modifiedDate | Date | Last time this file was modified by anyone (formatted RFC 3339 timestamp) |
file.properties | Array | The list of file’s properties |
file.publicLinkId | String | Public link id. [Since 2021.03] |
file.totalSize | String | Total size of all file’s versions |
file.createdDate | Date | Create time for this file (formatted ISO8601 timestamp) |
file.properties[].id | String | The file’s property id |
file.properties[].key | String | The file’s property key |
file.properties[].value | String | The file’s property value |
file.publicLink.type | String | Type of public links |
links[].rel | String | Link type |
links[].href | String | Link reference |
- Example request
curl 'http://localhost:8080/api/v1/public/ade7d543-19b8-40cd-8ded-0939007231be' -i -X GET \
-H 'X-co-auth-token: 6a0733488f9fd5b4754b7744e85391bd'
- 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"
}
]
}
}