remagicaDocs home
API referenceLibrary

Read a file's share link

GET
/asset-shares

Needs a key withlibrary:share

A file's share link: its token, public page and who it lets in. null when it was never shared.

Requires scope library:share.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Query Parameters

mediaKey*string

The file's storage key (an upload's, a generation's or a workflow output's). A node's result and the asset filed from it share one thread.

Length1 <= length <= 1024

Response Body

The share, or null.

application/json
  1. response
path*string
role*string

restricted (the link is off), view (anyone with it sees the file) or comment (and, signed in, comments on it).

Value in"restricted""view""comment"
showPrompt*boolean
token*string
Example Request
curl -X GET 'https://api.remagica.com/api/v1/asset-shares?mediaKey=generations%2Forg_1%2F2c9a7f10%2Fimage-0.png'
Example Response
{  "path": "string",  "role": "restricted",  "showPrompt": true,  "token": "string"}