Share API
(待译)
Praxis Share turns one object in the platform into a link that can be revoked: create a share for a file and anyone holding the link can read it, until you delete the share or it expires. Its vocabulary follows the sharing link of Microsoft Graph (a permission that carries a link of a type and a scope, created, listed and deleted as one resource). Differences: the object is named by a type and an id, {type: "file", id}, and file, canvas and media_asset create today; the link address comes back once, in the creation response as link.web_url, and is never shown again, so keep it or create another share; the link is always anonymous and read-only, with no sign-in step; opening the link signs a short-lived address for the content at that moment (five minutes), so a copied content address stops working on its own; opening a canvas share renders the first visible top-level frame to a picture at that moment, so the link shows the canvas as it is when opened; a share that is revoked or past expire_time answers 410 when the link is opened; deleting is a revoke and repeating it is harmless. A credential bound to specific files can share only those files.
- Create share —
POST /share/v1/permissions - Delete share —
DELETE /share/v1/permissions/{id} - List shares —
GET /share/v1/permissions - Retrieve share —
GET /share/v1/permissions/{id}