Sluby
REST APIDelivery

Per-object sia:// share URLs for direct-from-Sia playback, without credentials.

Gated like /v1/stream: a public asset by its id or a public playback ID needs nothing. A private asset or a signed-policy playback ID needs the `expires` and `sig` of its signed master URL, and the shares then never outlive `expires`. Expiries are capped like the authenticated route (six hours, one hour when gated) and rounded to five-minute slots that the server caches, so repeated calls do not mint again. Every map is sent `no-store` (`private, no-store` when gated): minting one is how a direct-from-Sia play reaches the server, and each counts as a play (see `play_count` on an asset), unless `renew` is set. Share URLs already handed out keep working until they expire, whatever happens to the asset meanwhile.

GET
/v1/share/{id}

Gated like /v1/stream: a public asset by its id or a public playback ID needs nothing. A private asset or a signed-policy playback ID needs the expires and sig of its signed master URL, and the shares then never outlive expires. Expiries are capped like the authenticated route (six hours, one hour when gated) and rounded to five-minute slots that the server caches, so repeated calls do not mint again. Every map is sent no-store (private, no-store when gated): minting one is how a direct-from-Sia play reaches the server, and each counts as a play (see play_count on an asset), unless renew is set. Share URLs already handed out keep working until they expire, whatever happens to the asset meanwhile.

Path Parameters

id*string

Asset UUID or pb_ playback ID.

Query Parameters

expires?integer

Expiry (unix seconds) from the signed master URL. Required when gated.

sig?string

Signature from the signed master URL. Required when gated.

expires_in?integer
Default3600

Response Body

Share URL map.

application/json
  1. response
master_object_id?string

The HLS master object id (hex).

shares?

Map of Sia object id (hex) to a short-lived sia:// share URL the browser player resolves + downloads directly, no backend proxy.

expires_at?string
Formatdate-time
Example Request
curl -X GET 'https://sluby.example.com/v1/share/string'
Example Response
{  "master_object_id": "string",  "shares": {    "property1": "string",    "property2": "string"  },  "expires_at": "2019-08-24T14:15:22Z"}