Update asset metadata.
Changing access_tier takes effect on the delivery gateway at once. An asset being deleted answers 404, as it does to every read. Send If-Match with the ETag of the version you edited (from GET or an earlier PATCH, or built from `updated_at` as `"<epoch milliseconds>"`) and the edit applies only if nobody changed the asset since; otherwise 412 with the asset as it is now. Processing changes the version too.
Changing access_tier takes effect on the delivery gateway at once. An asset being deleted answers 404, as it does to every read. Send If-Match with the ETag of the version you edited (from GET or an earlier PATCH, or built from updated_at as "<epoch milliseconds>") and the edit applies only if nobody changed the asset since; otherwise 412 with the asset as it is now. Processing changes the version too.
bearerAuthAuthorizationBearer <token>A Sluby API key (sluby_...) sent as Authorization: Bearer <key>. Keys carry scopes: upload, read, manage.
id*stringAsset id.
If-Match?stringOne or more ETags, or * for any version. The weak form of an ETag (W/"…", as a compressing proxy such as the bundled nginx sends it) matches the same version.
application/json- body
title?stringTrimmed; no control characters.
1 <= length <= 200description?stringNo control characters other than tabs and line breaks.
length <= 5000access_tier?string"public""private"Updated.
application/json- response
id*stringuuidtitle*stringdescription*stringmanifest_object_id*string|nullthumbnail_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"created""uploading""processing""ready""failed"access_tier*string"public""private"creator_address*stringsegment_count*integertotal_storage_bytes*integerplay_count*integerAll-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.
0 <= valuelast_played_at*|When the newest counted play happened; null before the first.
date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://sluby.example.com/api/v1/assets/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "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"}