Create shortcut for link
Create shortcut for link.
POST /api/v1/files/shortcut HTTP/1.1
- Request body
{
"shortcutResourceLink": "link",
"filename": "shortcutToLink",
"conflictStrategy": "keep_both",
"parentId": "ab58c5ad-7d4a-4d4d-99fa-14142aee81c0"
}
- Example request
curl 'http://localhost:8080/api/v1/files/shortcut' -i -X POST \
-H 'Content-Type: application/json' \
-H 'X-co-auth-token: 6a1306c1f9909b64eebe186ff5700131' \
-d '{
"shortcutResourceLink" : "link",
"filename" : "shortcutToLink",
"conflictStrategy" : "keep_both",
"parentId" : "ab58c5ad-7d4a-4d4d-99fa-14142aee81c0"
}'
- Response fields
| 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.createdDate | Date | Create time for this file (formatted ISO8601 timestamp) |
file.fileSize | Number | The size of the file in bytes |
file.lastModifyingUserId | String | The ID of the user who last modified the file |
file.lastModifyingUserFsId | String | The FS ID of the user who last modified the file |
file.lastModifyingUserFirstName | String | The first name of the user who last modified the file |
file.lastModifyingUserMiddleName | String | The middle name of the user who last modified the file |
file.lastModifyingUserLastName | String | The last name of the user who last modified the file |
file.modifiedByMeDate | Date | Last time this file was modified by the user (formatted RFC 3339 timestamp) |
file.autoCreationRevisions | Boolean | Should new version of file be created automatically during collaboration |
file.lastViewedByMeDate | Date | Last time this file was viewed by the user (formatted RFC 3339 timestamp) |
file.sharedWithMeDate | Date | Time at which this file was shared with the user (formatted RFC 3339 timestamp) |
file.modifiedDate | Date | Last time this file was modified by anyone (formatted RFC 3339 timestamp) |
file.parentId | String | The parent folder (parentReferenceId) which contains this file. The root has no parent |
file.creator | String | The original creator (userId) of this file |
file.creatorFsId | String | The FS ID of the user who create the file |
file.creatorFirstName | String | The first name of the user who create the file |
file.creatorMiddleName | String | The middle name of the user who create the file |
file.creatorLastName | String | The last name of the user who create the file |
file.properties | Array | The list of file’s properties |
file.checksum | String | An MD5 checksum for the content of this file |
file.headRevisionId | String | The ID of the file’s head (last) revision |
file.isVersion | Boolean | The file is version or not |
file.prerender | String | The id of prerendered file |
file.preview | String | The id of preview file |
file.previewFailureMark | Date | Flag to show unix time of unsuccessful preview generation |
file.prerenderFailureMark | Date | Flag to show unix time of unsuccessful prerender generation |
file.thumbnailFailureMark | Date | Flag to show unix time of unsuccessful thumbnail generation |
file.ownerId | String | The owner (userId) of this file |
file.etag | String | ETag (HTTP Entity Tag) of the file |
file.ownerFsId | String | The owner (userId) of this file |
file.publicLinkId | String | Public link id [Since 2021.03] |
file.tree | String | Absolute path to this file for current user. Set of parent’s names and name of the file |
file.ownerFirstName | String | The owner first name of this file |
file.ownerLastName | String | The owner last name of this file |
file.ownerMiddleName | String | The owner middle name of this file |
file.totalSize | Number | Total size of all file’s versions |
file.currentRevisionObject | Object | Current revision object. See Get file revision |
file.previewClientVersion | String | Version of preview client that generated preview |
file.specialDir | String | Type of special folder, if present |
file.originalFileIdOpt | String | Exist only for version and contained file id |
file.creatorIsDeleted | Boolean | Show that creator is deleted |
file.editorIsDeleted | Boolean | Show that editor is deleted |
file.ownerIsDeleted | Boolean | Show that owner is deleted |
file.ownerAvatar | String | Owner avarat |
file.creatorAvatar | String | Creator avatar |
file.editorAvatar | String | Editor avatar |
file.oldPath | String | Old file path |
file.parentFolderName | String | The name of the parent folder |
file.shortcutObject | Object | Object to which the shortcut is attached |
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.shortcutObject.resourceLink | String | Urlencoded external link |
links[].rel | String | Link type |
links[].href | String | Link reference |
- Example response
HTTP/1.1 200 OK
X-co-request-id: tVLv0gVswLWdHFw0fw8GmraPaEwGC1Wg
Content-Type: application/json
Content-Length: 2172
{
"file": {
"id": "b42834d2-a9de-4312-8f3c-2b0b5a478ab9",
"createdDate": "2025-10-23T13:45:15.000Z",
"creator": "testsrvdocs@srv.tacos.devoffice.ru",
"creatorFsId": "29e7c1f873e755248195fba2db99f233",
"creatorFirstName": "testsrvdocs",
"creatorLastName": "testsrvdocsov",
"creatorMiddleName": "testsrvdocsich",
"filename": "shortcutToLink",
"lastModifyingUserId": "testsrvdocs@srv.tacos.devoffice.ru",
"lastModifyingUserFsId": "29e7c1f873e755248195fba2db99f233",
"lastModifyingUserFirstName": "testsrvdocs",
"lastModifyingUserLastName": "testsrvdocsov",
"lastModifyingUserMiddleName": "testsrvdocsich",
"mediaType": "application/vnd.ncloudtech.cloudoffice.shortcut-external-link",
"modifiedByMeDate": "2025-10-23T13:45:15.000Z",
"modifiedDate": "2025-10-23T13:45:15.000Z",
"ownerFsId": "29e7c1f873e755248195fba2db99f233",
"ownerId": "testsrvdocs@srv.tacos.devoffice.ru",
"parentId": "ab58c5ad-7d4a-4d4d-99fa-14142aee81c0",
"properties": [
{
"id": "sharedParent",
"key": "sharedParent",
"value": "true"
}
],
"totalSize": "0",
"checksum": "b42834d2-a9de-4312-8f3c-2b0b5a478ab9null",
"tree": "/docs-test-main-fgqlffztdc/docs-test-makeShortcutToLinkExample-zzjqissbbu/shortcutToLink",
"ownerFirstName": "testsrvdocs",
"ownerLastName": "testsrvdocsov",
"ownerMiddleName": "testsrvdocsich",
"isVersion": false,
"creatorIsDeleted": false,
"editorIsDeleted": false,
"ownerIsDeleted": false,
"ownerAvatar": "e6489c75-e5ea-4e63-9cd6-db282ddc04cf",
"creatorAvatar": "e6489c75-e5ea-4e63-9cd6-db282ddc04cf",
"editorAvatar": "e6489c75-e5ea-4e63-9cd6-db282ddc04cf",
"shortcutObject": {
"resourceLink": "link"
}
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/b42834d2-a9de-4312-8f3c-2b0b5a478ab9"
},
{
"rel": "download",
"href": "http://localhost:8080/api/v1/files/b42834d2-a9de-4312-8f3c-2b0b5a478ab9/content"
},
{
"rel": "link",
"href": "http://localhost:8080/link/b42834d2-a9de-4312-8f3c-2b0b5a478ab9"
}
]
}