Share Links
Share links: every team link for admins, the caller's own links otherwise. On a demo instance a read-only account sees the demo Project's links. Any signed-in role may list; creating and revoking need share.manage.
Share links: every team link for admins, the caller's own links otherwise. On a demo instance a read-only account sees the demo Project's links. Any signed-in role may list; creating and revoking need share.manage.
- returns
A link that shares one file, folder or project with people outside the instance.
id*ID!Unique id.
slug*String!The slug in the share URL.
url*String!The full share URL.
mode*ShareMode!Who may open the link.
Values
PUBLICAnyone with the link.
PRIVATEAnyone with the link and its access code.
expiresAt?DateTimeWhen the link stops working, null for no expiry.
file?The shared file, when the target is a file.
folder?The shared folder, when the target is a folder.
project?The shared project, when the target is a project.
targetType*String!file, folder or project.
targetName?StringName of the target, null when the target was deleted (the client shows its own label).
accessCount*Int!How many times the link was opened.
accessCode?StringThe access code of a PRIVATE link, returned once by createShareLink and null everywhere else.
createdBy*Who created the link.
repThumbs*One to three representative files of the target, only delegating: a project target uses Project.repFiles, a folder target Folder.repFiles (the same daily sample), a file target is the file itself while it is ready. Empty, not an error, when the target was deleted or is in the trash.
Arguments
limitIntHow many files to return, clamped to 1 to 3.
createdAt*DateTime!When the link was created.
query ShareLinks { shareLinks { id slug url mode expiresAt file { id filename originalName mimeType size md5Checksum thumbnailUrl duplicateOf processedVersions { id kind kindLabel mimeType size downloadUrl createdAt } jobs { id kind kindLabel fileId status state progress attempts } } folder { id name project { id title description coverImage status totalFiles totalSize createdAt } parent { id name totalFiles folderType trashedAt createdAt updatedAt } totalFiles folderType trashedAt createdAt updatedAt } targetType targetName accessCount }}