Sluby
REST APIAssets

List assets with search, filters, sorting and pagination.

Each parameter may be given once; a repeated or malformed one is a 400. Unknown parameters are ignored.

GET
/api/v1/assets

Each parameter may be given once; a repeated or malformed one is a 400. Unknown parameters are ignored.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Query Parameters

limit?integer

Page size (1-100).

Range1 <= value <= 100
Default20
cursor?string

Keyset pagination cursor. Pass the next_cursor from the previous page to fetch the next one. A cursor that does not decode is a 400.

page?integer

Offset page number (alternative to cursor; sending both is a 400).

Range1 <= value <= 1000000
Default1
status?string

Filter by status.

Value in"created""uploading""processing""ready""failed"
access_tier?string
Value in"public""private"
search?string

Case-insensitive match on title or description, or an exact asset id.

Lengthlength <= 200
sort?string
Default"created_at"
Value in"created_at""title""duration""size"
order?string

Cursor paging is only available for created_at desc; other orders use page.

Default"desc"
Value in"asc""desc"

Response Body

A page of assets.

application/json
  1. response
data*array<>
total*integer

Every match of the filters, on all pages.

page*|

Null on a page fetched with a cursor.

limit*integer
next_cursor*string|null
has_more*boolean
Example Request
curl -X GET 'https://sluby.example.com/api/v1/assets'
Example Response
{  "data": [    {      "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"    }  ],  "total": 0,  "page": 0,  "limit": 0,  "next_cursor": "string",  "has_more": true}