Update Video Asset
This guide provides you the instructions to update a video asset from the Livepeer Studio Dashboard or through the Livepeer API.
The Livepeer API allows you to send video files to Livepeer and get them ready for optimized playback. Videos can be provided either by you (static content) or your users, given your application offers an interface for them to do so.
You should be familiar with Assets and Tasks and have generated a Livepeer Studio API key.
Step 1: Get the asset.id
of an existing asset
Get the asset.id
of an existing asset. An asset.id
can be found in the response object of any API call working with assets.
If you haven't created an asset yet, you can follow the upload a video asset guide to do so.
Step 2: Update the asset
Once you have an asset.id
, you can make a request to update the asset's name and metadata.
- Node
- curl
const storeAssetOnIPFS = await fetch("https://livepeer.studio/api/asset/{id}", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.API_TOKEN}`,
"Content-Type": "application/json",
},
body: {
"name": "testing123",
"meta": {
"name": "testing123",
"description": "new video"
}
}
});
curl -X PATCH https://livepeer.studio/api/asset/{id} \
-H 'content-type: application/json' \
-H 'authorization: Bearer $API_TOKEN' \
-d {
"name": "Example name",
"meta": {
"name": "testing123",
"description": "new video"
}
}