assets

Change when a share link stops working

Set a working link's expiry, counted from now rather than added to what is left, or send expires_in_days: null to take its end date away so it works until somebody turns it off. Only a link that still works can be changed: a revoked or already-expired one is refused, because its URL has been out of use and handing that same URL back is not an edit to a date. Share the file again with a new link instead. The file's LEVEL is never a refusal on its own: a date is not an audience, and a link on a private file is that file's address like any other. Prolonging a publication is publishing, so this needs the same authority as deciding who may read the file: the person who added it or a workspace admin. The one exception is a file already at 'Anyone with the link', whose audience is already decided and whose links any editor may keep working. That authority is answered before the link is looked up: 403 when you may read the file but may not decide its audience, whatever link id you name, and otherwise 404 when the file or the link does not exist, has been deleted, or belongs to another workspace.

patch/v1/assets/{asset_id}/share-links/{link_id}

Request

  • Base URL: https://api.patricia.app (the document declares no server; this is the origin it was published from)
  • URL: https://api.patricia.app/v1/assets/{asset_id}/share-links/{link_id}
  • Auth: HTTP bearer

Path parameters

asset_idstring uuid required

The asset's id.

link_idstring uuid required

The share link's id.

Headers

X-Tenant-Idstring nullable

Request body

expires_in_daysinteger nullable required

How many days from now the link should keep working. Send null to take its end date away, so it works until somebody turns it off.

Response

Successful Response

password_protectedboolean required
idstring uuid required
created_atstring date-time required
revoked_atstring date-time nullable

When this link was shut off, or null while it still works.

expires_atstring date-time nullable

When this link stops working on its own. Null means it never does: either somebody created it with no end date, or it predates expiry entirely. Such a link is still revoked the moment somebody turns it off, deletes the file, or sets the file to 'Only me' — and a revoked link never comes back.

Changes

No recorded changes to this operation across all 1 revision of this API.