Validates that our service can connect to a social media or content distribution platform using the stream URL associated with a specific publishing targetRefers to a configuration that identifies the URL to which your content may be published. A publishing schedule leverages a publishing target configuration to syndicate a live channel or a live event to a social media platform..
This endpoint cannot be used to verify HLS pull streams, since our service does not connect to a social media or content distribution platform when publishing a pull target. Rather, it is up to the social media or content distribution platform to pull the stream using the publishing schedule's HLS pull URL.
Request
Request syntax:
PATCH /syndication-target-test/Publishing Target 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 Target ID Required | Replace this variable with the system-defined ID assigned to the desired publishing target configuration. Use the Get Multiple Publishing Targets endpoint to retrieve a list of publishing targets and their system-defined ID. |
Request body parameters:
Pass the following request body parameters:
Name | Data Type | Description |
---|---|---|
test | String | Set this parameter to rtmp-connection. |
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 this publishing target. | ||||||
@type | String | Returns SyndicationTargetAction. | ||||||
description | String | Indicates a description for the social media or content distribution platform. | ||||||
id | String | Identifies this publishing target by its system-defined ID. | ||||||
platform | String | Identifies a social media or content distribution platform by its name. Valid values are: Facebook | YouTube | Twitch | Periscope | Zixi | Other | |
platform_config | Dictionary | Contains additional platform-specific settings. | ||||||
status | String | Indicates the publishing target's status. Valid values are: activeIndicates that one or more publishing schedules that leverage this publishing target are in the active state. | stoppedIndicates that none of the publishing schedules that leverage this publishing target are in the active or error state. | errorIndicates that one or more publishing schedules that leverage this publishing target are in the error state. | ||||
target_protocol | String | Indicates the protocol through which your content will be published. Valid values are: rtmp | rtmps | hls | hls-pull | zixi | srt | rist |
target_stream | String | Returns ******. This value represents the URL to which your stream will be published. | ||||||
test | Dictionary | Contains the results of the stream URL validation. |
platform_config Dictionary
The platform_config dictionary contains the following platform-specific settings:
Name | Data Type | Description |
---|---|---|
clipping_profile_id | String | Facebook and YouTube (Integrated Authentication) Indicates the Clipping profile, whose credentials will be used to authenticate to Facebook or YouTube, by its system-defined ID. Use the Get Syndication Publishing-Compatible Clipping Profiles endpoint to retrieve Clipping profiles and their system-defined IDs. |
host | String | AWS Elemental MediaConnect, Pluto TV, and ZIXI (Push) Indicates the hostname or IP address for the desired platform or your Zixi-enabled device. |
integrated | Boolean | Facebook and YouTube Indicates how your live stream will be published to Facebook or YouTube. Valid values are: true: Live streams will be published using integrated authentication to either: + The Facebook page identified by the page_id property. + A YouTube Studio dashboard. false: Live streams will be published to the stream URL identified by the target_stream property. |
page_id | String | Facebook Only Identifies a Facebook page by its system-defined ID. Your live stream will be published to this page. Learn more (Live Channels). Learn more (Live Events). |
password | String | AWS Elemental MediaConnect, Pluto TV, and ZIXI (Push) Returns ******. This value represents the password of the stream to which your content will be published. |
port | Integer | Indicates the port for the desired platform or platform-enabled device. Zixi-enabled devices and servers typically listen on port 2088. |
re_schedule | Boolean | Facebook Only Indicates whether our service will create and then publish a new Facebook live event upon reaching Facebook's live event time limit. |
remote_id | String | Reserved for future use. |
stream_id | String | AWS Elemental MediaConnect, Pluto TV, and ZIXI (Push) Returns ******. This value represents the ID of the stream to which your content will be published. |
type | String | Returns push. |
test Dictionary
The test dictionary contains the results for the following tests:
- Stream URL syntax.
- Social media or content distribution platform connection.
Name | Data Type | Description |
---|---|---|
passed | List of string values | Contains a message for each test that passed. Example: uri is valid |
failed | List of string values | Contains a message for each test that failed. Example: failure to connect via rtmp |
Sample Request/Response
Call the validate_stream_url module (Python 3) to validate a stream URL. This module imports names from the api_auth module.
import requests
from api_auth import APICredentials, APIParams
import json
import requests
from api_auth import APICredentials, APIParams
class ValidateStreamURL:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._validate_stream_url()
def _validate_stream_url(self):
publishing_target_id = 'b7abed5070384462ae0fec6bd791262e'
url = "{}{}{}".format(self.host, "/api/v4/syndication-target-test/", publishing_target_id)
payload = {'test': 'rtmp-connection'}
headers = {'Content-Type': 'application/json'}
response = requests.patch(
url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
)
print(response.json())
ValidateStreamURL().run()
Response:
{
"@id": "/api/v4/syndication-target-test/b7abed5070384462ae0fec6bd791262e",
"@type": "SyndicationTargetAction",
"id": "b7abed5070384462ae0fec6bd791262e",
"platform": "Facebook",
"description": "Facebook publishing",
"target_protocol": "rtmp",
"target_stream": "******",
"status": "stopped",
"test": {
"passed": [
"uri is valid"
],
"failed": [
"failure to connect via rtmp"
]
}
}