Shotstash
API referenceGraphQL referenceMutations

Create Share Link

Creates a share link. Needs share.manage.

Creates a share link. Needs share.manage.

Arguments

input*

The link.

Returns

ShareLink!
  1. 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

PUBLIC

Anyone with the link.

PRIVATE

Anyone with the link and its access code.

expiresAt?DateTime

When 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?String

Name 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?String

The 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

limitInt

How many files to return, clamped to 1 to 3.

createdAt*DateTime!

When the link was created.

mutation CreateShareLink($input: ShareLinkInput!) {  createShareLink(input: $input) {    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  }}