For Streaming Projects, encoding job and Video are in a one-to-one relationship. Once the encoding job finishes output to CDN, that means the streaming manifests, subtitles, thumbnail images and the video clips have been placed on BlendVision’s streaming cloud storage associated with CDN endpoints. An associated Video record will be created.
Since these storages will incur storage fees, you can delete those Video Contents to save cost once the specific content is confirmed that is not viewable by end users anymore.
Get Video Contents of Job
Once the Video Contents has been uploaded to the cloud, you can find the "content_id" from the response from the Get Job Detail Status API.
Get Video Contents detail
Once you have the target content ID, you can inquire about the details further.
curl -X GET 'https://api.az.blendvision.io/api/v1/contents/{{contentID}}' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: {{apiKey}}'
The response will look like:
{
"cdn_urls": {
"dash": [
{
"profile_names": ["string"],
"url": "https://fakeurl/jobid.mpd"
}
],
"hls": [
{
"profile_names": ["string"],
"url": "https://fakeurl/jobid.m3u8"
}
]
},
"filename": "origin filename.mp4",
"id": "contentid",
"job_id": "jobid",
"status": "ready",
"subtitles": [
{
"code": "eng",
"name": "English",
"url": "https://fakeurl/jobid.srt"
}
],
"thumbnail_url": "https://fakeurl/jobid/thumbnail/thumbnail.vtt",
"title": "new video name",
"video_codec": "h264"
}
In the response, you can find:
- "job_id": "jobid" Correspond Job ID
- "cdn_urls": {...} CDN endpoints of streaming manifest
- "thumbnail_url": "https://fakeurl..." CDN endpoint of thumbnail seeking
- "filename": "origin filename.mp4" The name of origin file uploaded
Delete Video Contents
You can make an API request to delete Video Contents from CDN.
❗Notice: This is an irreversible action. Please make sure that the Video Contents are no longer needed when you perform the delete action.
curl -X DELETE 'https://api.az.blendvision.io/api/v1/contents' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: {{apiKey}}' \
--data-raw '{
"ids":["{{contentID}}"]
}'