Asset
Update an asset
PATCH
/
asset
/
{assetId}
Authorization
Path
Body
curl --request PATCH \
--url https://livepeer.studio/api/asset/{assetId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"name": "filename.mp4",
"playbackPolicy": {
"type": "public",
"webhookContext": {},
"webhookId": "<string>"
},
"storage": {
"ipfs": {}
}
}'
{
"createdAt": 1587667174725,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video",
"hash": [
{
"algorithm": "sha256",
"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57"
}
],
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"name": "filename.mp4",
"playbackId": "eaw4nk06ts2d0mzb",
"playbackPolicy": {
"type": "public",
"webhookContext": {},
"webhookId": "<string>"
},
"playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8",
"size": 84934509,
"source": {
"encryption": {},
"gatewayUrl": "<string>",
"type": "url",
"url": "<string>"
},
"status": {
"errorMessage": "<string>",
"phase": "uploading",
"progress": 123,
"updatedAt": 1587667174725
},
"storage": {
"ipfs": {},
"status": {
"phase": "waiting",
"tasks": {}
}
},
"type": "video",
"videoSpec": {
"bitrate": 1000000,
"duration": 23.83,
"format": "mp4",
"tracks": []
}
}
Authorizations
Authorization
string
headerrequiredBearer api-key
Path Parameters
assetId
string
requiredID of the asset
Body
application/json
creatorId
name
string
Name of the asset. This is not necessarily the filename, can be a custom name or title
playbackPolicy
object
Whether the playback policy for a asset or stream is public or signed
storage
object
Response
200 - application/json
createdAt
number
Timestamp (in milliseconds) at which asset was created
creatorId
object
downloadUrl
string
URL to manually download the asset if desired
hash
object[]
Hash of the asset
id
string
requiredname
string
requiredName of the asset. This is not necessarily the filename, can be a custom name or title
playbackId
string
Used to form playback URL and storage folder
playbackPolicy
object
Whether the playback policy for a asset or stream is public or signed
playbackUrl
string
URL for HLS playback
size
number
Size of the asset in bytes
source
object
requiredOption 1
Option 2
Option 3
status
object
Status of the asset
storage
object
type
enum<string>
Type of the asset.
Available options:
video
, audio
videoSpec
object
Video metadata
Was this page helpful?
curl --request PATCH \
--url https://livepeer.studio/api/asset/{assetId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"name": "filename.mp4",
"playbackPolicy": {
"type": "public",
"webhookContext": {},
"webhookId": "<string>"
},
"storage": {
"ipfs": {}
}
}'
{
"createdAt": 1587667174725,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video",
"hash": [
{
"algorithm": "sha256",
"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57"
}
],
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"name": "filename.mp4",
"playbackId": "eaw4nk06ts2d0mzb",
"playbackPolicy": {
"type": "public",
"webhookContext": {},
"webhookId": "<string>"
},
"playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8",
"size": 84934509,
"source": {
"encryption": {},
"gatewayUrl": "<string>",
"type": "url",
"url": "<string>"
},
"status": {
"errorMessage": "<string>",
"phase": "uploading",
"progress": 123,
"updatedAt": 1587667174725
},
"storage": {
"ipfs": {},
"status": {
"phase": "waiting",
"tasks": {}
}
},
"type": "video",
"videoSpec": {
"bitrate": 1000000,
"duration": 23.83,
"format": "mp4",
"tracks": []
}
}