Retrieve information about the health of the link between the encoder and the CSL slicer.
Get Link Health
Retrieve information about the health of the link between the encoder and the CSL slicer.
Request
Request syntax:
GET /managed-slicer/slicer/monitor/Slicer ID
Request URL variable:
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 |
---|---|
CSL Slicer ID Required | Replace this variable with the system-defined ID assigned to the desired CSL slicer. Use the Get All CSL Slicers endpoint to retrieve a list of CSL slicers and their system-defined IDs. |
Response
The response for a successful request contains the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path that returns this resource. |
@type | String | Returns StreamMonitor. |
session | Dictionary | Contains average link health statistics for the current CSL slicer session. A session is initiated when a CSL slicer starts receiving data from an encoder. |
recent | Dictionary | Contains recent statistics on the health for the link between the encoder and the CSL slicer. |
cms_session_fingerprint | String | Reserved for future use. |
cms_session_id_fingerprint | String | Reserved for future use. |
If an encoder is not currently connected to the specified CSL slicer, then the response will only contain the @id and @type properties.
session Dictionary
The session dictionary contains link health statistics for the current CSL slicer session through the following properties:
Name | Data Type | Description |
---|---|---|
round_trip_time | Number | Indicates the latest round trip time between the encoder and the CSL slicer in milliseconds. |
link_uptime | Float | Indicates the duration, in hours, for the connection between the encoder and the CSL slicer. |
latency_setting | Number | Indicates the length of time, in milliseconds, that the CSL slicer will wait before processing data packets. This delay provides time for packet correction to take place. |
stream_bitrate | Float | Indicates the rate, in Kbps, at which data is being transferred from the encoder to the CSL slicer. |
packets_inbound | Number | Indicates the total number of data packets received by the CSL slicer. |
packets_outbound | Number | Indicates the total number of data packets sent to the encoder by the CSL slicer. |
percent_link_success | Float | Indicates the percentage of data packets that were successfully received by the CSL slicer. |
packets_errored | Number | Indicates the total number of data packets that were not successfully delivered. |
percent_errorred | Float | Indicates the percentage of data packets that resulted in an error. |
packets_FEC_corrected | Number | Indicates the total number of data packets that were successfully delivered after being corrected by Forward Error Correction (FEC). |
percent_fixed_by_FEC | Float | Indicates the percentage of data packets that were successfully delivered after being corrected by Forward Error Correction (FEC). |
packets_ARQ_corrected | Number | Indicates the total number of data packets that were successfully delivered as a result of automatic repeat request (ARQ). |
percent_fixed_by_ARQ | Float | Indicates the percentage of data packets that were successfully delivered as a result of automatic repeat request (ARQ). |
ARQ_requests | Number | Indicates the total number of requests that triggered ARQ. |
ARQ_fails | Number | Indicates the total number of requests that were unsuccessful after triggering ARQ. |
percent_failed_ARQ | Float | Indicates the percentage of requests that were unsuccessful after triggering ARQ. |
recent Dictionary
The recent dictionary describes recent link health statistics through the following properties:
Name | Data Type | Description |
---|---|---|
stream_bitrate | Float | Indicates the rate, in Kbps, at which data is being transferred from the encoder to the CSL slicer. |
packets_inbound | Number | Indicates the sum of the data packets received by the CSL slicer during the most recent measurement interval. |
packets_outbound | Number | Indicates the sum of the data packets sent to the encoder by the CSL slicer during the most recent measurement interval. |
percent_link_success | Float | Indicates the percentage of data packets that were successfully received by the CSL slicer during the most recent measurement interval. |
packets_errored | Number | Indicates the sum of the data packets that were not successfully delivered during the most recent measurement interval. |
percent_errorred | Float | Indicates the percentage of data packets that resulted in an error during the most recent measurement interval. |
packets_FEC_corrected | Number | Indicates the sum of the data packets that were successfully delivered after being corrected by Forward Error Correction (FEC) during the most recent measurement interval. |
percent_fixed_by_FEC | Float | Indicates the percentage of data packets that were successfully delivered after being corrected by Forward Error Correction (FEC) during the most recent measurement interval. |
packets_ARQ_corrected | Number | Indicates the total number of data packets that were successfully delivered as a result of automatic repeat request (ARQ). |
percent_fixed_by_ARQ | Float | Indicates the percentage of data packets that were successfully delivered as a result of automatic repeat request (ARQ). |
ARQ_requests | Number | Indicates the total number of requests that triggered ARQ. |
ARQ_fails | Number | Indicates the total number of requests that were unsuccessful after triggering ARQ. |
percent_failed_ARQ | Float | Indicates the percentage of requests that were unsuccessful after triggering ARQ. |
Sample Request/Response
Call the get_link_health module (Python 3) to retrieve health statistics for the link between the encoder and the CSL slicer. This module imports names from the api_auth module.
import json
import requests
from api_auth import APICredentials, APIParams
class GetLinkHealth:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
"""
Get link health.
"""
self._get_link_health()
def _get_link_health(self):
csl_slicer_id = "bcc4d23b45ba43e8b1e93141a10fee7e" # Replace with your CSL slicer ID.
url = "{}{}{}".format(self.host, "/api/v4/managed-slicer/slicer/monitor/", csl_slicer_id)
response = requests.get(
url, params=APIParams(APICredentials()).get_params({})
)
if response.status_code == 200:
print(response.json())
else:
print(response.status_code)
GetLinkHealth().run()
Response:
{
"@id": "/api/v4/managed-slicer/slicer/monitor/bcc4d23b45ba43e8b1e93141a10fee7e",
"@type": "StreamMonitor",
"session": {
"round_trip_time": 14,
"link_uptime": 25.17,
"latency_setting": 1000,
"stream_bitrate": 2248.0,
"packets_inbound": 20966998,
"packets_outbound": 0,
"percent_link_success": 99.97,
"packets_errored": 5530,
"percent_errored": 0.03,
"packets_FEC_corrected": 0,
"percent_fixed_by_FEC": 0.0,
"packets_ARQ_corrected": 0,
"percent_fixed_by_ARQ": 0.0,
"ARQ_requests": 0,
"ARQ_fails": 5530,
"percent_failed_ARQ": 0.03
},
"recent": {
"stream_bitrate": 2557.0,
"packets_inbound": 2339,
"packets_outbound": 0,
"percent_link_success": 100.0,
"packets_errored": 0,
"percent_errored": 0.0,
"packets_FEC_corrected": 0,
"percent_fixed_by_FEC": 0.0,
"packets_ARQ_corrected": 0,
"percent_fixed_by_ARQ": 0.0,
"ARQ_requests": 0,
"ARQ_fails": 0,
"percent_failed_ARQ": 0.0
},
"cms_session_fingerprint": "33a77bded4d8d86ab2e4a4c533ac0778821417b4",
"cms_session_id_fingerprint": "42428ed15c5139277884bfbf9b2946dc0f4d88d6"
}