Retrieves encoding information for the rays.
A stream with a specific quality configuration based on set bitrate and resolution targets. Each ray is divided into slices associated with a specific publishing schedule. Refers to a configuration that identifies a live channel or live event and a publishing target. Use a publishing schedule to syndicate a live channel or a live event to a social media platform.
Request
Request syntax:
GET /syndication-ray-details/[Publishing Schedule ID](#PublishingScheduleIDGETRays)
Define the following variable when submitting the above request:
| Variable | Description |
|---|---|
| Publishing Schedule ID Required | Replace this variable with the system-defined ID assigned to the desired publishing schedule. Use the Get Multiple Publishing Schedules endpoint to retrieve a list of publishing schedules and their system-defined ID. |
Response
The response for a successful request contains the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to an endpoint that returns the rays corresponding to a publishing schedule configuration. |
| @type | String | Returns RayDetails. |
| all | List of dictionaries | Contains a list of rays and their encoding details. |
| high | Dictionary | Contains encoding details for high quality publishing. |
| low | Dictionary | Contains encoding details for low quality publishing. |
| medium | Dictionary | Contains encoding details for medium quality publishing. |
Ray Dictionary
This type of dictionary describes the encoding details for:
- Each ray in your encoding profile. This type of dictionary is contained within the all list.
- Low, medium, and high quality rays. This information is reported within the low, medium, and high dictionaries, respectively.
Each of these dictionaries contain the following properties:
| Name | Data Type | Description | |
|---|---|---|---|
| active | Boolean | Indicates whether a publishing schedule has been configured to use this ray. A publishing schedule may only be configured to use a single ray. | |
| audio_codec | String | Indicates the ray's audio codec. Returns AAC. | |
| audio_kbps | Integer | Indicates the ray's audio bitrate. | |
| fps | Integer | Indicates the number of frames per second. | |
| max_height | Integer | Indicates the ray's maximum height in pixels. | |
| max_width | Integer | Indicates the ray's maximum width in pixels. | |
| ray_name | String | all List Only Indicates the name of the ray. | |
| video_codec | String | Indicates the ray's video codec. Valid values are: AVC | HEVC |
| video_kbps | Integer | Indicates the ray's video bitrate in kbps. |
Sample Request/Response
The code below (Python 3) shows how to get the rays corresponding to a publishing schedule configuration.
This code imports names from the api_auth module for V4 APIs (see below).
import requests
from api_auth import APICredentials, APIParams
class RayDetails:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._get_rays()
def _get_rays(self):
publishing_schedule_id = 'a9b1a994baab48adbcfceb23523bbab5'
url = "{}{}{}".format(self.host, "/api/v4/syndication-ray-details/", publishing_schedule_id)
headers = {'Content-Type': 'application/json'}
response = requests.get(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
RayDetails().run()Response:
{
"@id": "/api/v4/syndication-ray-details/98c880d6582d461d883dc0e733a2a4cd",
"@type": "RayDetails",
"all": [{
"audio_codec": "AAC",
"fps": 22,
"max_height": 54,
"video_kbps": 36,
"max_width": 96,
"ray_name": "a",
"audio_kbps": 18,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 15,
"max_height": 108,
"video_kbps": 58,
"max_width": 192,
"ray_name": "b",
"audio_kbps": 30,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 30,
"max_height": 144,
"video_kbps": 130,
"max_width": 256,
"ray_name": "c",
"audio_kbps": 48,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 30,
"max_height": 234,
"video_kbps": 276,
"max_width": 416,
"ray_name": "d",
"audio_kbps": 78,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 30,
"max_height": 396,
"video_kbps": 560,
"max_width": 704,
"ray_name": "e",
"audio_kbps": 96,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 30,
"max_height": 504,
"video_kbps": 1040,
"max_width": 896,
"ray_name": "f",
"audio_kbps": 128,
"active": false,
"video_codec": "AVC"
}, {
"audio_codec": "AAC",
"fps": 30,
"max_height": 720,
"video_kbps": 2372,
"max_width": 1280,
"ray_name": "g",
"audio_kbps": 128,
"active": false,
"video_codec": "AVC"
}
],
"low": {
"max_width": 704,
"max_height": 396,
"fps": 30,
"video_codec": "AVC",
"video_kbps": 560,
"audio_codec": "AAC",
"audio_kbps": 96,
"active": false
},
"medium": {
"max_width": 896,
"max_height": 504,
"fps": 30,
"video_codec": "AVC",
"video_kbps": 1040,
"audio_codec": "AAC",
"audio_kbps": 128,
"active": false
},
"high": {
"max_width": 1280,
"max_height": 720,
"fps": 30,
"video_codec": "AVC",
"video_kbps": 2372,
"audio_codec": "AAC",
"audio_kbps": 128,
"active": true
}
}