# HLS Segment
API call format
GET /broker/vod/list/<source_guid>/hls/{<hls_segment_media_type>}/segments
Description
Get HLS segments by GUID and hls manifest. This call gets a HLS segment for all formats by specifying source GUID and <<hls_segment_media_type>>.
Precondition:
- No authorization token is needed.
- Mandatory elements (should be specified):
- <source_guid> - valid source guid. Take a specific source guid using Vod list API call.
- <hls_manifest_media_type> - Get mediaType for a specific segment using HLS Manifest API call.
Postcondition
- On success response code should be 200
- On success the whole JSON body of a HLS video segment for all available video formats.
- On failure an error will be returned with the right error code and description.
Example:
[Request] GET https://<base_api_url>/broker/vod/list/<source_guid>/hls/hls_segments_000001/segments
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"}
[Response] 200
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Response]
{
"status": true,
"data": [
{
"destBucket": "<vod-destinationbucket>",
"segments": {
"720_2500000": "https://<server>/sources/<source_guid>/hls/<hls_name>_1280x720p-2.5Mbps-2500000_00001.ts",
"540_1900000": "https://<server>/sources/<source_guid>/hls/<hls_name>_960x540p-1.9Mbps-1900000_00001.ts",
"270_400000": "https://<server>/sources/<source_guid>/hls/<hls_name>_480x270p-0.4Mbps-400000_00001.ts",
"360_1200000": "https://<server>/sources/<source_guid>/hls/<hls_name>_640x360p-1.2Mbps-1200000_00001.ts",
"360_600000": "https://<server>/sources/<source_guid>/hls/<hls_name>_640x360p-0.6Mbps-600000_00001.ts"
},
"mediaType": "hls_segments_000001",
"guid": "<source_guid>",
"playlistType": "VOD",
"discontinuitySequence": 0,
"offset": 0,
"prefix": "<source_guid>/hls/",
"targetDuration": 7,
"duration": 6006,
"isFirst": true,
"mediaSequence": 1
}
]
}