JSON Schema
JSON Schema
The JSON schema of the data to POST
to the endpoint above has the following structure:
{
"meta": {
"authentication": {
"password": "",
"username": ""
},
"qos": <int>,
"georules": {
"regions": [<"",...>],
"restricted": <true|false>,
},
"stream": [
{
"level": <int>,
"name": <string>,
"properties": [
"videoBR": <int>,
"videoHeight": <int>,
"videoWidth": <int>
]
}, ...
]
}
}
As an example, using mystream
as the top-level GUID, the JSON in the POST
to the above endpoint would look like the following:
{
"meta": {
"authentication": {
"password": "",
"username": ""
},
"qos": 3,
"georules": {
"regions": ["US", "UK"],
"restricted": false,
},
"stream": [
{
"level": 3,
"name": "mystream_3",
"properties": [
"videoBR": 128000,
"videoHeight": 180,
"videoWidth": 320
]
},
{
"level": 2,
"name": "mystream_2",
"properties": [
"videoBR": 512000,
"videoHeight": 360,
"videoWidth": 640
]
},
{
"level": 1,
"name": "mystream_1",
"properties": [
"videoBR": 1000000,
"videoHeight": 720,
"videoWidth": 1280
]
}
]
}
}
Response
A successful response will return the top-level provisioning with the meta
field populated with the JSON sent in the POST
:
{
"name": "mystream",
"scope": "live",
"data": {
"meta": <see above JSON>
}
}
You can, as well, access this new provision at any time by making a GET
request on the Stream Manager as such:
https://yourstreammanager.com/streammanager/api/3.1/admin/event/meta/live/mystream?accessToken=myaccessToken