Sluby
REST APIAssets

Get an asset.

GET
/api/v1/assets/{id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

A Sluby API key (sluby_...) sent as Authorization: Bearer <key>. Keys carry scopes: upload, read, manage.

Path Parameters

id*string

Asset id.

Response Body

The asset.

application/json
  1. response
id*string
Formatuuid
title*string
description*string
manifest_object_id*string|null
thumbnail_object_ids*array<string>
duration_ms*|

Null until processing has measured it.

resolution*|

Source resolution, e.g. 1920x1080; null until processing has read it.

status*string
Value in"created""uploading""processing""ready""failed"
access_tier*string
Value in"public""private"
creator_address*string
segment_count*integer
total_storage_bytes*integer
play_count*integer

All-time plays: player loads this server saw, through the gateway or by minting a share map to play direct from Sia. One viewer loading the same video again within 30 minutes counts once, previews in the Studio do not count, and counts reach the API within about 10 seconds.

Range0 <= value
last_played_at*|

When the newest counted play happened; null before the first.

Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://sluby.example.com/api/v1/assets/string'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "title": "string",  "description": "string",  "manifest_object_id": "string",  "thumbnail_object_ids": [    "string"  ],  "duration_ms": 0,  "resolution": "string",  "status": "created",  "access_tier": "public",  "creator_address": "string",  "segment_count": 0,  "total_storage_bytes": 0,  "play_count": 0,  "last_played_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}