flow-docs

VDP-ExAmino API

Introduction

This is the documentation of the VDP-ExAmino API endpoints (GET, PUT, DELETE) for a RESTful web service built using AWS Lambda. These endpoints allow to interact with the service to create, read, and delete.

API Base URL: https://api.statsperform.video/optavoice/vdp/event

Endpoints

1. PUT

https://api.statsperform.video/optavoice/vdp/event/{id}

Description:
Creates or updates an item in the DB with the specified id.

Path Parameters:

Example Request Body:

{
	"id": 2046240,
	"start_datetime": `2023-04-24T08:00:00.000Z`,
	"end_datetime": `2023-04-24T09:30:00.000Z`,
	"description": "TEST: Examino friday 2",
	"primary_source_specifier": "srt://test_primary_source_ip",
	"secondary_source_specifier": "srt://test_primary_source_ip",
	"publications": [
		{
			"__union_type": "hls_publication",
			"video_selectors": [
				{
					"bitrate_identifier": 5001
				}
			],
			"audio_selectors": [
				{
					"__union_type": "standard_audio_selector",
					"bitrate_identifier": 5001,
					"pid": 258
				}
			],
			"hls_provider_details": {
				"__union_type": "akamai_hls",
				"primary_base_url": "http://primary_base_url_1/",
				"backup_base_url": "http://backup_base_url_1/"
			},
			"master_playlist_url": "https://akamai_endpoint_url_1.m3u8"
		},
		{
			"__union_type": "hls_publication",
			"video_selectors": [
				{
					"bitrate_identifier": 5001
				}
			],
			"audio_selectors": [
				{
					"__union_type": "standard_audio_selector",
					"bitrate_identifier": 5001,
					"pid": 259
				}
			],
			"hls_provider_details": {
				"__union_type": "akamai_hls",
				"primary_base_url": "http://primary_base_url_2/",
				"backup_base_url": "http://primary_base_url_2/"
			},
			"master_playlist_url": "https://akamai_endpoint_url_2.m3u8"
		}
	]
}

Response:

Error responses:

{ "error": "Invalid id provided" }
{ "error": "start_datetime was not provided" }
{ "error": "end_datetime was not provided" }
{ "error": "description was not provided" }
{ "error": "id was not provided" }
{ "error": "path param id and body id is not equal" }
{ "error": "primary_source_specifier was not provided" }
{ "error": "secondary_source_specifier) was not provided" }
{ "error": "publications was not provided" }
{ "error": "audio_selectors is not an array" }
{ "error": "audio_selectors pid missing" }
{ "error": "audio_selectors pid is not a number" }
{ "error": "hls_provider_details missing" }
{ "error": "hls_provider_details.primary_base_url missing" }
{ "error": "hls_provider_details.backup_base_url missing" }
{ "error": "master_playlist_url missing" }

2. GET

By id

https://api.statsperform.video/optavoice/vdp/event/{id}

Description:
Fetches a specific item by its unique identifier (id) from the DB.

Path Parameters:

Response:

{
	"stop": 1682328600000,
	"audiomap": "{\"258\":\"https://akamai_endpoint_url_2.m3u8\",\"259\":\"https://akamai_endpoint_url_1.m3u8\"}",
	"input": "srt://test_primary_source_ip",
	"provider": "ov",
	"sport": "",
	"channel": "ov-2046240",
	"start": 1682323200000,
	"title": "TEST: Examino friday 2"
}
{}
{ "error": "Invalid id provided" }

Simple get

https://api.statsperform.video/optavoice/vdp/event

Description:
Fetches all OptaVoice items from the DynamoDB table.

Response:

[
	{
		"stop": 1682328600000,
		"audiomap": "{\"258\":\"https://akamai_endpoint_url_2.m3u8\",\"259\":\"https://akamai_endpoint_url_1.m3u8\"}",
		"input": "srt://test_primary_source_ip",
		"provider": "ov",
		"sport": "",
		"channel": "ov-2046240",
		"start": 1682323200000,
		"title": "TEST: Examino friday 2"
	}
]

3. DELETE

https://api.statsperform.video/optavoice/vdp/event/{id}

Description:
Deletes a specific item by its unique identifier (id) from the DB.

Path Parameters:

Response:

{ "error": "Invalid id provided" }
{ "message": "Item not found or already deleted" }