Get Rays

Retrieves encoding information for the raysA stream with a specific quality configuration based on set bit rate and resolution targets. Each ray is divided into slices. associated with a specific publishing scheduleRefers 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

Define the following variable when submitting the above request:

VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3).Description
Publishing Schedule ID RequiredReplace 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:

NameData TypeDescription
@idStringIndicates the relative path to an endpoint that returns the rays corresponding to a publishing schedule configuration.
@typeStringReturns RayDetails.
allList of dictionariesContains a list of rays and their encoding details.
highDictionaryContains encoding details for high quality publishing.
lowDictionaryContains encoding details for low quality publishing.
mediumDictionaryContains 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:

NameData TypeDescription
activeBooleanIndicates whether a publishing schedule has been configured to use this ray. A publishing schedule may only be configured to use a single ray.
audio_codecStringIndicates the ray's audio codec. Returns AAC.
audio_kbpsIntegerIndicates the ray's audio bitrate.
fpsIntegerIndicates the number of frames per second.
max_heightIntegerIndicates the ray's maximum height in pixels.
max_widthIntegerIndicates the ray's maximum width in pixels.
ray_nameStringall List Only Indicates the name of the ray.
video_codecStringIndicates the ray's video codec. Valid values are: AVC HEVC
video_kbpsIntegerIndicates the ray's video bitrate in kbps.

Sample Request/Response

Call the get_rays module (Python 3) to get the rays corresponding to a publishing schedule configuration. This module imports names from the api_auth module.

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
	}
}