Skip to main content

Create shortcut for file

Create shortcut for file.

POST /api/v1/files/shortcut HTTP/1.1
  1. Request body
{
"filename": "shortcutToFile",
"conflictStrategy": "keep_both",
"parentId": "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375",
"shortcutObjectId": "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375"
}
  1. 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 '{
"filename" : "shortcutToFile",
"conflictStrategy" : "keep_both",
"parentId" : "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375",
"shortcutObjectId" : "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375"
}'
  1. Response fields
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.createdDateDateCreate time for this file (formatted ISO8601 timestamp)
file.fileSizeNumberThe size of the file in bytes
file.lastModifyingUserIdStringThe ID of the user who last modified the file
file.lastModifyingUserFsIdStringThe FS ID of the user who last modified the file
file.lastModifyingUserFirstNameStringThe first name of the user who last modified the file
file.lastModifyingUserMiddleNameStringThe middle name of the user who last modified the file
file.lastModifyingUserLastNameStringThe last name of the user who last modified the file
file.modifiedByMeDateDateLast time this file was modified by the user (formatted RFC 3339 timestamp)
file.autoCreationRevisionsBooleanShould new version of file be created automatically during collaboration
file.lastViewedByMeDateDateLast time this file was viewed by the user (formatted RFC 3339 timestamp)
file.sharedWithMeDateDateTime at which this file was shared with the user (formatted RFC 3339 timestamp)
file.modifiedDateDateLast time this file was modified by anyone (formatted RFC 3339 timestamp)
file.parentIdStringThe parent folder (parentReferenceId) which contains this file. The root has no parent
file.creatorStringThe original creator (userId) of this file
file.creatorFsIdStringThe FS ID of the user who create the file
file.creatorFirstNameStringThe first name of the user who create the file
file.creatorMiddleNameStringThe middle name of the user who create the file
file.creatorLastNameStringThe last name of the user who create the file
file.propertiesArrayThe list of file’s properties
file.checksumStringAn MD5 checksum for the content of this file
file.headRevisionIdStringThe ID of the file’s head (last) revision
file.isVersionBooleanThe file is version or not
file.prerenderStringThe id of prerendered file
file.previewStringThe id of preview file
file.previewFailureMarkDateFlag to show unix time of unsuccessful preview generation
file.prerenderFailureMarkDateFlag to show unix time of unsuccessful prerender generation
file.thumbnailFailureMarkDateFlag to show unix time of unsuccessful thumbnail generation
file.ownerIdStringThe owner (userId) of this file
file.etagStringETag (HTTP Entity Tag) of the file
file.ownerFsIdStringThe owner (userId) of this file
file.publicLinkIdStringPublic link id [Since 2021.03]
file.treeStringAbsolute path to this file for current user. Set of parent’s names and name of the file
file.ownerFirstNameStringThe owner first name of this file
file.ownerLastNameStringThe owner last name of this file
file.ownerMiddleNameStringThe owner middle name of this file
file.totalSizeNumberTotal size of all file’s versions
file.currentRevisionObjectObjectCurrent revision object. See Get file revision
file.previewClientVersionStringVersion of preview client that generated preview
file.specialDirStringType of special folder, if present
file.originalFileIdOptStringExist only for version and contained file id
file.creatorIsDeletedBooleanShow that creator is deleted
file.editorIsDeletedBooleanShow that editor is deleted
file.ownerIsDeletedBooleanShow that owner is deleted
file.ownerAvatarStringOwner avarat
file.creatorAvatarStringCreator avatar
file.editorAvatarStringEditor avatar
file.oldPathStringOld file path
file.parentFolderNameStringThe name of the parent folder
file.shortcutObjectObjectObject to which the shortcut is attached
file.properties[].idStringThe file’s property id
file.properties[].keyStringThe file’s property key
file.properties[].valueStringThe file’s property value
file.shortcutObject.idStringIdentity (ID) of the object
file.shortcutObject.mediaTypeStringMedia type of the file
links[].relStringLink type
links[].hrefStringLink reference
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: KVRxep852ndsjs0LE39HDFRBVKOTgylO
Content-Type: application/json
Content-Length: 2256
{
"file": {
"id": "e775ea54-1f8d-4e70-afde-8f70d65f7788",
"createdDate": "2025-10-23T13:44:56.000Z",
"creator": "testsrvdocs@srv.tacos.devoffice.ru",
"creatorFsId": "29e7c1f873e755248195fba2db99f233",
"creatorFirstName": "testsrvdocs",
"creatorLastName": "testsrvdocsov",
"creatorMiddleName": "testsrvdocsich",
"filename": "shortcutToFile",
"lastModifyingUserId": "testsrvdocs@srv.tacos.devoffice.ru",
"lastModifyingUserFsId": "29e7c1f873e755248195fba2db99f233",
"lastModifyingUserFirstName": "testsrvdocs",
"lastModifyingUserLastName": "testsrvdocsov",
"lastModifyingUserMiddleName": "testsrvdocsich",
"mediaType": "application/vnd.ncloudtech.cloudoffice.shortcut-object",
"modifiedByMeDate": "2025-10-23T13:44:56.000Z",
"modifiedDate": "2025-10-23T13:44:56.000Z",
"ownerFsId": "29e7c1f873e755248195fba2db99f233",
"ownerId": "testsrvdocs@srv.tacos.devoffice.ru",
"parentId": "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375",
"properties": [
{
"id": "sharedParent",
"key": "sharedParent",
"value": "true"
}
],
"totalSize": "0",
"checksum": "e775ea54-1f8d-4e70-afde-8f70d65f7788null",
"tree": "/docs-test-main-fgqlffztdc/docs-test-makeShortcutToFileExample-olbbsjhtob/shortcutToFile",
"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": {
"id": "fad10a6b-ca24-42ee-b0a2-a8a8a40fa375",
"mediaType": "application/vnd.ncloudtech.cloudoffice.folder"
}
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/e775ea54-1f8d-4e70-afde-8f70d65f7788"
},
{
"rel": "download",
"href": "http://localhost:8080/api/v1/files/e775ea54-1f8d-4e70-afde-8f70d65f7788/content"
},
{
"rel": "link",
"href": "http://localhost:8080/link/e775ea54-1f8d-4e70-afde-8f70d65f7788"
}
]
}