This is a documentation of the cms-upload API endpoint (POST) for a RESTful web service built using AWS Lambda. This endpoint allow to interact with the service to read the stored data.
API Base URL: https://api.statsperform.video/optavision/cms
POST
https://api.statsperform.video/optavision/cms
Description:
Giving a specified body to the endpoint and saving video content to CMS
const endpoint = 'https://api.statsperform.video/optavision/cms'
const message = {
channel: 'rec-123456',
source: 'https://cdn.statsperform.video/2023/04/26/index.m3u8',
title: 'Manchester vs Arsenal',
fixtureId: 'lkdi0g1es9m6gillw5bkdfuei'
}
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(message)
}
fetch(endpoint, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error))
{ "message": "record added to cms. container id : CONTAINER_ID" }
{ "error": "Will give back the exact error what the creation of the container will cause" }
{ "error": "Will give back the exact error what the submit caused" }