Get In Touch
CD TECH Innovations Pvt Ltd
#95, Pantheon Road, Egmore, Chennai, TN
INDIA 600008
Inquiries
- enquiry@cdtech.in
- Ph +91 80690 78888
CD TECH Innovations Pvt Ltd
#95, Pantheon Road, Egmore, Chennai, TN
INDIA 600008
Video conferencing calls are organized using the API reference. You can control the list of conferences by adding or removing a conference. Following is a brief explanation, about how the API works.
To get the channel details, we can send a request to the URL: livebox/api/GetChannelDetails , and please make sure to enter your request parameters without any spaces or any special characters.
HTTP Request: POST
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the conference |
key | string | The password for the conference |
{
"PlayURLs" : {
DASHURL: "http://server_url/channelName_dash/streamname.mpd"
HLSURL: "http://server_url/channelName_hls/streamname.m3u8"
SecureDASHURL: "https://server_url/channelName_dash/streamname.mpd"
SecureHLSURL: "https://server_url/channelName_hls/streamname.m3u8"
rtmpurl: "rtmp://server_url:port_number/channelName/streamname"
},
"StreamURL" : "rtmp://server_url:port_number/channelName/streamname?psk=str eamname "
}
Parameters | Type | Description |
---|---|---|
PlayURLs | string | The list of play URLs |
DASHURL | string | The Dash URL |
HLSURL | string | The HLS URL |
SecureDASHURL | string | The Secure Dash URL |
SecureHLSURL | string | The Secure HLS URL |
rtmpurl | string | The rtmp URL |
StreamURL | string | The streaming URL |
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1", "username": "apiuser", "key":"################"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/GetChannelDetails
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName": " Channel-1", "username": "apiuser", "key":"################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/GetChannelDetails')
xhr.send(params);
$.post("https://server_url/livebox/api/GetChannelDetails ",
{
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/GetChannelDetails'
obj = {
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
channelName : "Channel-1",
username : "apiuser",
key : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/GetChannelDetails", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/GetChannelDetails";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/GetChannelDetails")
header = {'Content-Type': 'text/json'}
user = {
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName": "Channel-1",
"username": "apiuser",
"key": "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/GetChannelDetails", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = ‘https://server_url/livebox/api/GetChannelDetails’;
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'username' => 'apiuser',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To create a channel, we can send a request to the URL: livebox/api/CreateChannel , and please make sure to enter your request parameters without any spaces or any special characters.
HTTP Request: POST
{
"channelName" : "Channel-1",
"streamname" : "Stream-1",
"password" : "################"
"username" : "apiuser",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
streamname | string | The name of the stream |
password | string | The password for the stream |
Livebox username | string | The username for the conference |
key | string | The password for the conference |
{
"streamurl" : "rtmp://server_name:port_number/<Channel_name>/",
"streamkey" : "<streamname>?psk=<password>",
}
Parameters | Type | Description |
---|---|---|
streamurl | string | The url for the stream |
streamkey | string | The key for the stream |
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1", "streamname" : "Stream-1", "password" : "################", "username": "apiuser", "key":"################"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/CreateChannel
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName": " Channel-1", "streamname" : "Stream-1", "password" : "################", "username": "apiuser", "key":"################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST', 'https://server_url/livebox/api/CreateChannel')
xhr.send(params);
$.post("https://server_url/livebox/api/CreateChannel",
{
channelName : "Channel-1",
streamname : "Stream-1",
password : "################",
username : "apiuser",
key : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/CreateChannel'
obj = {
channelName : "Channel-1",
streamname : "Stream-1",
password : "################"
username : "apiuser",
key : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
channelName : "Channel-1",
streamname : "Stream-1",
password : "################",
username : "apiuser",
key : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/CreateChannel", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/CreateChannel";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"streamname\": \"Stream-1\",\n" +
" \"password\": \"################\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/CreateChannel")
header = {'Content-Type': 'text/json'}
user = {
channelName : "Channel-1",
streamname : "Stream-1",
password : "################",
username : "apiuser",
key : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName": "Channel-1",
"streamname" : "Stream-1",
"password" : "################"
"username": "apiuser",
"key": "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/CreateChannel", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/CreateChannel';
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'streamname' => 'Stream-1',
'password' => '################',
'username' => 'apiuser',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To delete a channel, we can send a request to the URL: livebox/api/DeleteChannel , and please make sure to enter your request parameters without any spaces or any special characters.
HTTP Request: POST
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the conference |
key | string | The password for the conference |
Response data: Channel deleted successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1", "username": "apiuser", "key":"################"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/DeleteChannel
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName": " Channel-1", "username": "apiuser", "key":"################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/DeleteChannel')
xhr.send(params);
$.post("https://server_url/livebox/api/DeleteChannel ",
{
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/DeleteChannel'
obj = {
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
channelName : "Channel-1",
username : "apiuser",
key : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/DeleteChannel", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/DeleteChannel";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/DeleteChannel")
header = {'Content-Type': 'text/json'}
user = {
channelName : "Channel-1",
username : "apiuser",
key : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName": "Channel-1",
"username": "apiuser",
"key": "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/DeleteChannel", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/DeleteChannel';
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'username' => 'apiuser',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get the embed code, we can send a request to the URL: /livebox/api/getEmbedCodeOfTheChannel , and please make sure to enter your request parameters without any spaces or any special characters.
If the API is used in the server side, a server secret key must be passed in the request, along with the other requests :
{"Serverkey" : "################"}
If the API is used in the native apps, a native app secret key must be passed in the request, along with the other requests :
{"Nativeappkey" : "################"}
HTTP Request: POST
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the conference |
key | string | The password for the conference |
{
"Httpembedcode" : "<iframe scrolling src="http://server_url/livebox/player/?chnl=1" width="400px" height="400px" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen allow="autoplay" ></iframe>",
"Httpsembedcode" : "<iframe scrolling src="http://server_url/livebox/player/?chnl=1" width="400px" height="400px" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen allow="autoplay" ></iframe>",
}
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1","username" : "apiuser","key" : "################"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/getEmbedCodeOfTheChannel
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName" : "Channel-1","username" : "apiuser","key" : "################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/getEmbedCodeOfTheChannel')
xhr.send(params);
$.post("https://server_url/livebox/api/getEmbedCodeOfTheChannel",
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/getEmbedCodeOfTheChannel'
obj = {
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/getEmbedCodeOfTheChannel", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/getEmbedCodeOfTheChannel";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/getEmbedCodeOfTheChannel")
header = {'Content-Type': 'text/json'}
user =
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/getEmbedCodeOfTheChannel", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = "https://server_url/livebox/api/getEmbedCodeOfTheChannel";
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'username' => 'apiuser',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
curl_close($ch);
$results = json_decode($result, true);
print_r($results);
To edit a channel, we can send a request to the URL: livebox/api/editchannel , and please make sure to enter your request parameters without any spaces or any special characters.
HTTP Request: POST
{
"channelName" : "Channel-1",
"password" : "################",
"username" : "apiuser",
"key" :"################"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
password | string | The password for the channel |
Livebox username | string | The username for the conference |
key | string | The password for the conference |
Response data: Updated successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1", "password" : "################", "username": "apiuser", "key":"################"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/editchannel
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName": " Channel-1", "password" : "################", "username": "apiuser", "key":"################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST', 'https://server_url/livebox/api/editchannel')
xhr.send(params);
$.post("https://server_url/livebox/api/editchannel",
{
channelName : "Channel-1",
password : "################",
username : "apiuser",
key : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/editchannel'
obj = {
channelName : "Channel-1",
password : "################",
username : "apiuser",
key : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
channelName : "Channel-1",
password : "################",
username : "apiuser",
key : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/editchannel", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/editchannel";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"password\": \"################\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/editchannel")
header = {'Content-Type': 'text/json'}
user = {
channelName : "Channel-1",
password : "################",
username : "apiuser",
key : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName": "Channel-1",
"password": "################",
"username": "apiuser",
"key": "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/editchannel", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/editchannel';
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'password' => '################',
'username' => 'apiuser',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get a live streaming status of a channel, we can send a request to the URL: livebox/api/StreamingStatus , and please make sure to enter your request parameters in the case sensitive variabales .
HTTP Request: POST
{
"channelName" : "Channel-1",
"username" : "apiuser",
"key" : "################",
"Serverkey" : "################"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | Livebox user’s username |
Serverkey | string | Api key |
key | string | Livebox user’s password |
channelName | string | Name of the channel |
{
name:[*name of the channel*],
live:[{*streaming status with BitRates*}]
}
Here’s an example of our requests, in various languages:
$ curl -X POST 'http://<domain-name>/livebox/api/StreamingStatus' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json' \
-d '{ "channelName" : "Channel-1",
"username" : "api user",
"key" : "################",
"Serverkey" : "################"
}'
fetch('http://<domain-name>/livebox/api/StreamingStatus', {
method: 'POST',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"channelName" : "Channel-1",
"username" : "api user",
"key" : "################",
"Serverkey" : "################"
})
}).then(res => res.json())
.then(res => console.log(res));
$.post("https://server_url/livebox/api/StreamingStatus ", {
"channelName" : "Channel-1",
"username" : "api user",
"key" : "################",
"Serverkey" : "################"
}, function(data ,status){});
import requests
url = 'https://server_url/livebox/api/StreamingStatus'
obj = {
channelName : "Channel-1",
username : "api user",
key : "################",
"Serverkey" : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
channelName : "Channel-1",
username : "api user",
key : "################",
"Serverkey" : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await
client.PostAsync("https://server_url/livebox/api/StreamingStatus",
content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException
{
String postEndpoint ="https://server_url/livebox/api/StreamingStatus";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
" \"Serverkey\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/StreamingStatus")
header = {'Content-Type': 'text/json'}
user = {
channelName : "Channel-1",
username : "api user",
key : "################",
Serverkey : "################",
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName": "Channel-1",
"username": "api user",
"key": "################",
"Serverkey" : "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err :=
http.Post("https://server_url/livebox/api/StreamingStatus",
"application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/StreamingStatus';
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'username' => 'apiuser',
'key' => '################',
'Serverkey'=> '################',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:
application/json'));
$result = curl_exec($ch);
To start the FLV recording, we can send a request to the url: /livebox/api/channelRecording.
HTTP Request: POST
Request action : “on”
{
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the recording |
key | string | The password for the recording |
channelName | string | The name of the channel |
recordingType | string | The format of the recording |
ProfileName | string | The profile name of the recording |
transcodeMode | string | The status of the transcode mode |
transcodePreset | string | The preset selected for transcoding |
filename | string | The name for the recoded video file |
action | string | The type of action by the user |
Sample Response : Changes applied successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user", "key" : "################", "recordingType" : "FLV", "action" : "on", "channelName" : "channel-1", "ProfileName" : "Profile-1", "transcodeMode" : "off"; "transcodePreset" : "Preset-1", "channel-1" : { "Profile-1" : { "record" : "all","record_path" : "channel-1/Profile-1", "record_suffix" : "filename.flv", "record_unique" : "on"}}}' -H "Content-Type: application/json" -X https://server_url/livebox/api/channelRecording
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user", "key" : "################", "recordingType" : "FLV", "action" : "on", "channelName" : "channel-1", "ProfileName" : "Profile-1", "transcodeMode" : "off"; "transcodePreset" : "Preset-1", "channel-1" : { "Profile-1" : { "record" : "all","record_path" : "channel-1/Profile-1", "record_suffix" : "filename.flv", "record_unique" : "on"}}});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/channelRecording')
xhr.send(params);
$.post('https://server_url/livebox/api/channelRecording',
{
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off";
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/channelRecording'
obj = {
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off";
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off";
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync('https://server_url/livebox/api/channelRecording', content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = 'https://server_url/livebox/api/channelRecording';
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"recordingType\": \"FLV\",\n" +
" \"action\": \"on\",\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"ProfileName\": \"Profile-1\"\n" +
" \"transcodeMode\": \"off\",\n" +
" \"transcodePreset\": \"Preset-1\"\n" +
" \"Channel-1\": \"{\n" +
" \"Profile-1\": \"{\n" +
" \"record\": \"all\",\n" +
" \"record_path\": \"channel-1/Profile-1\"\n" +
" \"record_suffix\": \"filename.flv\",\n" +
" \"record_unique\": \"on\",\n" +
"}\n" +
"}\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/channelRecording")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off";
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user",
"key" : "################",
"recordingType" : "FLV",
"action" : "on",
"channelName" : "channel-1",
"ProfileName" : "Profile-1",
"transcodeMode" : "off";
"transcodePreset" : "Preset-1",
"channel-1" : {
"Profile-1" : {
"record" : "all",
"record_path" : "channel-1/Profile-1",
"record_suffix" : "filename.flv",
"record_unique" : "on"
}
}
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/channelRecording", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/channelRecording';
$ch = curl_init($url);
$jsonData = array(
'username' => 'apiuser',
'key' => '################',
'recordingType' => 'FLV',
'action' => 'on',
'channelName' => 'Channel-1',
'ProfileName' => 'Profile-1'
'transcodeMode' => 'off';
'transcodePreset' => 'Preset-1',
'Channel-1' => array(
'Profile-1' => array(
'record' => 'all”,
'record_path' => 'channel-1/Profile-1',
'record_suffix' => 'filename.flv',
'record_unique' => 'on'
)
)
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To stop the FLV recording, we can send a request to the url: /livebox/api/channelRecording.
HTTP Request: POST
Request action : “off”
{
"action" : "off",
"username" : "apiuser",
"key" : "################",
"channelName" : "Channel-1",
"recordingType" : "FLV",
"ProfileName" : "Profile-1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the recording |
key | string | The password for the recording |
channelName | string | The name of the channel |
recordingType | string | The format of the recording |
ProfileName | string | The profile name of the recording |
action | string | The type of action by the user |
Sample Response : Changes applied successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"action" : "off","username" : "apiuser","key" : "################","channelName" : "Channel-1","recordingType" : "FLV","ProfileName" : "Profile-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/channelRecording
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"action" : "off","username" : "apiuser","key" : "################","channelName" : "Channel-1","recordingType" : "FLV","ProfileName" : "Profile-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/channelRecording')
xhr.send(params);
$.post("https://server_url/livebox/api/channelRecording",
{
"action" : "off",
"username" : "apiuser",
"key" : "################",
"channelName" : "Channel-1",
"recordingType" : "FLV",
"ProfileName" : "Profile-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/channelRecording'
obj = {
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "FLV"
"ProfileName" : "Profile-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "FLV"
"ProfileName" : "Profile-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/channelRecording", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/channelRecording";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"action\": \"off\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"recordingType\": \"FLV\",\n" +
" \"ProfileName\": \"Profile-1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/channelRecording")
header = {'Content-Type': 'text/json'}
user = {
"action" : "off"
"username" :"apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "FLV"
"ProfileName" : "Profile-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "FLV"
"ProfileName" : "Profile-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/channelRecording", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/channelRecording';
$ch = curl_init($url);
$jsonData = array(
'action' => 'off',
'username' => 'apiuser',
'key' => '################',
'channelName' => 'Channel-1',
'recordingType' => 'FLV',
'ProfileName' => 'Profile-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To start the MP4 recording, we can send a request to the url: /livebox/api/channelRecording.
HTTP Request: POST
Request action : “on”
{
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"FileName" : "filename-1",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the recording |
key | string | The password for the recording |
channelName | string | The name of the channel |
recordingType | string | The format of the recording |
transcodeMode | string | The status of the transcode mode |
transcodePreset | string | The preset selected for transcoding |
filename | string | The name for the recoded video file |
action | string | The type of action by the user |
Sample Response : Changes applied successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user", "key" : "################", "recordingType" : "HLS", "action" : "on", "channelName" : "channel-1", "transcodeMode" : "off", "transcodePreset" : "Preset-1", "FileName" : "filename-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/channelRecording
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user", "key" : "################", "recordingType" : "HLS", "action" : "on", "channelName" : "channel-1", "transcodeMode" : "off", "transcodePreset" : "Preset-1", "FileName" : "filename-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/channelRecording')
xhr.send(params);
$.post('https://server_url/livebox/api/channelRecording',
{
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"FileName" : "filename-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/channelRecording'
obj = {
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"FileName" : "filename-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"FileName" : "filename-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/channelRecording", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/channelRecording";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"recordingType\": \"HLS\",\n" +
" \"action\": \"on\",\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"transcodeMode\": \"off\",\n" +
" \"transcodePreset\": \"Preset-1\",\n" +
" \"FileName\": \"filename-1\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/channelRecording")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"FileName" : "filename-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user",
"key" : "################",
"recordingType" : "HLS",
"action" : "on",
"channelName" : "channel-1",
"transcodeMode" : "off",
"transcodePreset" : "Preset-1",
"FileName" : "filename-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/channelRecording", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/channelRecording';
$ch = curl_init($url);
$jsonData = array(
'username' => 'apiuser',
'key' => '################',
'recordingType' => 'HLS',
'action' => 'on',
'channelName' => 'Channel-1',
'transcodeMode' => 'off',
'transcodePreset' => 'Preset-1',
'FileName' => 'filename-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To stop the video recording, we can send a request to the url: /livebox/api/channelRecording.
HTTP Request: POST
Request action : “off”
{
"action" : "off",
"username" : "apiuser",
"key" : "################",
"channelName" : "Channel-1",
"recordingType" : "HLS",
"FileName" : "api_filename"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the recording |
key | string | The password for the recording |
channelName | string | The name of the channel |
recordingType | string | The format of the recording |
FileName | string | The file name of the recording |
action | string | The type of action by the user |
Sample Response : Changes applied successfully
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"action" : "off","username" : "apiuser","key" : "################","channelName" : "Channel-1","recordingType" : "HLS", "FileName" : "api_filename"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/channelRecording
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"action" : "off","username" : "apiuser","key" : "################","channelName" : "Channel-1","recordingType" : "HLS", "FileName" : "api_filename"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/channelRecording')
xhr.send(params);
$.post("https://server_url/livebox/api/channelRecording",
{
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "HLS"
"FileName" : "api_filename"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/channelRecording'
obj = {
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "HLS"
"FileName" : "api_filename"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "HLS"
"FileName" : "api_filename"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/channelRecording", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/channelRecording";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"action\": \"off\",\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"recordingType\": \"HLS\",\n" +
" \"FileName\": \"api_filename\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/channelRecording")
header = {'Content-Type': 'text/json'}
user = {
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "HLS"
"FileName" : "api_filename"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"action" : "off"
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
"recordingType" : "HLS"
"FileName" : "api_filename"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/channelRecording", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/channelRecording';
$ch = curl_init($url);
$jsonData = array(
'action' => 'off',
'username' => 'apiuser',
'key' => '################',
'channelName' => 'Channel-1',
'recordingType' => 'HLS',
'FileName' => 'api_filename'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get channel recorded files, we can send a request to the URL: /livebox/api/
HTTP Request: POST
{
"username" : "apiuser",
"key" : "################",
"channelName" : "Channel-1"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the recording |
key | string | The password for the recording |
{ File-1, File-2, File-3 }
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "apiuser","key" : "################","channelName" : "Channel-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/api/showchannelRecordedFiles
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "apiuser","key" : "################","channelName" : "Channel-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/api/showchannelRecordedFiles')
xhr.send(params);
$.post("https://server_url/livebox/api/showchannelRecordedFiles",
{
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/api/showchannelRecordedFiles'
obj = {
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/api/showchannelRecordedFiles", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/api/showchannelRecordedFiles";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"apiuser\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/api/showchannelRecordedFiles")
header = {'Content-Type': 'text/json'}
user = {
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "apiuser"
"key" : "################"
"channelName" : "Channel-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/api/showchannelRecordedFiles", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/api/showchannelRecordedFiles';
$ch = curl_init($url);
$jsonData = array(
'username' => 'apiuser',
'key' => '################',
'channelName' => 'Channel-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get all the presets, we can send a request to the URL: /livebox/GetAllPresets
HTTP Request: POST
{
"username" : "api_user",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
{ Preset-1, Preset-2, Preset-3 }
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################"}' -H "Content-Type: application/json" -X https://server_url/livebox/GetAllPresets
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/GetAllPresets')
xhr.send(params);
$.post("https://server_url/livebox/GetAllPresets",
{
"username" : "api_user",
"key" : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/GetAllPresets'
obj = {
"username" : "api_user",
"key" : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user",
"key" : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/GetAllPresets", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/GetAllPresets";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/GetAllPresets")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user",
"key" : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user",
"key" : "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/GetAllPresets", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/GetAllPresets';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To change the URL preset, the user need to have their own channel then, we can send a request to the URL: /livebox/changeurlpreset.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channelName | string | The channel name for the push destination |
url | string | The rtmp URL |
presetname | string | The preset name for the push destination |
Sample Response : Preset has been changed successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channelName" : "Channel-1","url" : "rtmp://server_rtmp_url","presetname" : "Preset-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/changeurlpreset
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channelName" : "Channel-1","url" : "rtmp://server_rtmp_url","presetname" : "Preset-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/changeurlpreset')
xhr.send(params);
$.post("https://server_url/livebox/changeurlpreset",
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/changeurlpreset'
obj = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/changeurlpreset", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/changeurlpreset";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"url\": \"rtmp://server_rtmp_url\",\n" +
" \"presetname\": \"Preset-1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/changeurlpreset")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"url" : "rtmp://server_rtmp_url"
"presetname" : "Preset-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/changeurlpreset", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/changeurlpreset';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
'url' => 'rtmp://server_rtmp_url',
'presetname' => 'Preset-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To add new push URL, the user need to have their own channel then, we can send a request to the URL: /livebox/AddPushDestinationURL.
HTTP Request: POST
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channelName | string | The name of the channel |
RTMPurl | string | The rtmp URL |
preset | string | The preset name of the push destination |
status | string | The current status |
Sample Response : URL has been created successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"status" : "false","username" : "api_user","key" : "################","channelName" : "Channel-1","RTMPurl" : "rtmp://server_rtmp_url","preset" : "Preset-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/AddPushDestinationURL
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"status" : "false","username" : "api_user","key" : "################","channelName" : "Channel-1","RTMPurl" : "rtmp://server_rtmp_url","preset" : "Preset-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/AddPushDestinationURL')
xhr.send(params);
$.post("https://server_url/livebox/AddPushDestinationURL",
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/AddPushDestinationURL'
obj = {
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/AddPushDestinationURL", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/AddPushDestinationURL";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"status\": \"false\",\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"url\": \"rtmp://server_rtmp_url\",\n" +
" \"preset\": \"Preset-1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/AddPushDestinationURL")
header = {'Content-Type': 'text/json'}
user = {
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/AddPushDestinationURL", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/AddPushDestinationURL';
$ch = curl_init($url);
$jsonData = array(
'status' => 'false',
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
'RTMPurl' => 'rtmp://server_rtmp_url',
'preset' => 'Preset-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To turn the push URL streaming ON/OFF, the user need to have their own channel then, we can send a request to the URL: /livebox/Pushurlmodesettings.
HTTP Request: POST
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channelName | string | The name of the channel |
RTMPurl | string | The rtmp URL |
preset | string | The preset name of the push destination |
status | string | The current status |
Sample Response : ON – URL has been enabled / OFF – URL has been disabled.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"status" : "false","username" : "api_user","key" : "################","channelName" : "Channel-1","RTMPurl" : "rtmp://server_rtmp_url","preset" : "Preset-1"}" -H "Content-Type: application/json" -X https://server_url/livebox/Pushurlmodesettings
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"status" : "false","username" : "api_user","key" : "################","channelName" : "Channel-1","RTMPurl" : "rtmp://server_rtmp_url","preset" : "Preset-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/Pushurlmodesettings')
xhr.send(params);
$.post("https://server_url/livebox/Pushurlmodesettings",
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/Pushurlmodesettings'
obj = {
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/Pushurlmodesettings", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/Pushurlmodesettings";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"status\": \"false\",\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"url\": \"rtmp://server_rtmp_url\",\n" +
" \"preset\": \"Preset-1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/Pushurlmodesettings")
header = {'Content-Type': 'text/json'}
user = {
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"status" : "false"
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"RTMPurl" : "rtmp://server_rtmp_url"
"preset" : "Preset-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/Pushurlmodesettings", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/Pushurlmodesettings';
$ch = curl_init($url);
$jsonData = array(
'status' => 'false',
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
'RTMPurl' => 'rtmp://server_rtmp_url',
'preset' => 'Preset-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get the channel push URL, the user need to have their own channel then, we can send a request to the URL: /livebox/GetPushDestinationDetails.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
{
"Pushstatus" : "false",
"Url" : "rtmp://server_rtmp_url",
"forcerestart" : "0",
"id" : "##########",
"preset" : "Preset-1",
"retryattempts" : "0"
}
Parameters | Type | Description |
---|---|---|
Pushstatus | string | The current push status |
Url | string | The RTMP URL |
preset | string | The preset name used |
retryattempts | string | The number of retry attempts |
forcerestart | string | The number of restarts |
id | string | The user id |
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channelName" : "Channel-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/GetPushDestinationDetails
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channelName" : "Channel-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/GetPushDestinationDetails')
xhr.send(params);
$.post("https://server_url/livebox/GetPushDestinationDetails",
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/GetPushDestinationDetails'
obj = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/GetPushDestinationDetails", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/GetPushDestinationDetails";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/GetPushDestinationDetails")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/GetPushDestinationDetails", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/GetPushDestinationDetails';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To delete the push URL, the user need to have their own channel then, we can send a request to the URL: /livebox/RemovePushdestinationurl.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channel_name | string | The name of the channel |
urlname | string | The rtmp URL |
Sample Response : URL has been deleted successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channel_name" : "Channel-1","urlname" : "rtmp://server_rtmp_url"}' -H "Content-Type: application/json" -X https://server_url/livebox/RemovePushdestinationurl
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channel_name" : "Channel-1","urlname" : "rtmp://server_rtmp_url"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/RemovePushdestinationurl')
xhr.send(params);
$.post("https://server_url/livebox/RemovePushdestinationurl",
{
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/RemovePushdestinationurl'
obj = {
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/RemovePushdestinationurl", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/RemovePushdestinationurl";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channel_name\": \"Channel-1\",\n" +
" \"urlname\": \"rtmp://server_rtmp_url\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/RemovePushdestinationurl")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channel_name" : "Channel-1"
"urlname" : "rtmp://server_rtmp_url"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/RemovePushdestinationurl", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/RemovePushdestinationurl';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channel_name' => 'Channel-1',
'urlname' => 'rtmp://server_rtmp_url',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To modify the push URL, the user need to have their own channel then, we can send a request to the URL: /livebox/editPushdestinationDetails.
HTTP Request: POST
{
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channelName | string | The name of the channel |
existurl | string | The existing rtmp URL |
newurl | string | The new rtmp URL |
preset | string | The preset name for the push destination |
Sample Response : Updated successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"channelName" : "Channel-1","username" : "api_user","key" : "################","existurl" : "rtmp://existing_server_rtmp_url","newurl" : "rtmp://new_server_rtmp_url","preset" : "Preset-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/editPushdestinationDetails
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"channelName" : "Channel-1","username" : "api_user","key" : "################","existurl" : "rtmp://existing_server_rtmp_url","newurl" : "rtmp://new_server_rtmp_url","preset" : "Preset-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/editPushdestinationDetails')
xhr.send(params);
$.post("https://server_url/livebox/editPushdestinationDetails",
{
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
}
function(data ,channelName){});
import requests
url = 'https://server_url/livebox/editPushdestinationDetails'
obj = {
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/editPushdestinationDetails", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/editPushdestinationDetails";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"existurl\": \"rtmp://existing_server_rtmp_url\",\n" +
" \"newurl\": \"rtmp://new_server_rtmp_url\",\n" +
" \"preset\": \"Preset-1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/editPushdestinationDetails")
header = {'Content-Type': 'text/json'}
user = {
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"channelName" : "Channel-1"
"username" : "api_user"
"key" : "################"
"existurl" : "rtmp://existing_server_rtmp_url"
"newurl" : "rtmp://new_server_rtmp_url"
"preset" : "Preset-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/editPushdestinationDetails", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/editPushdestinationDetails';
$ch = curl_init($url);
$jsonData = array(
'channelName' => 'Channel-1',
'username' => 'api_user',
'key' => '################',
'existurl' => 'rtmp://existing_server_rtmp_url',
'newurl' => 'rtmp://new_server_rtmp_url',
'preset' => 'Preset-1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
For push destination bulk actions, the user need to have their own channel then, we can send a request to the URL: /livebox/bulkactionforpushurl.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Turn ON all"
}
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Turn OFF all"
}
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channel | string | The name of the channel |
action | string | The type of action by the user |
Turn ON all | string | Turn ON everything |
Turn OFF all | string | Turn OFF everything |
Remove all | string | Removes everything |
Sample Response : Changed successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channel" : "Channel-1","action" : "Remove all"}' -H "Content-Type: application/json" -X https://server_url/livebox/bulkactionforpushurl
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channel" : "Channel-1","action" : "Remove all"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/bulkactionforpushurl')
xhr.send(params);
$.post("https://server_url/livebox/bulkactionforpushurl",
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/bulkactionforpushurl'
obj = {
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/bulkactionforpushurl", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/bulkactionforpushurl";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channel\": \"Channel-1\",\n" +
" \"action\": \"Remove all\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/bulkactionforpushurl")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"action" : "Remove all"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/bulkactionforpushurl", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/bulkactionforpushurl';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channel' => 'Channel-1',
'action' => 'Remove all',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
For push URL retry and restart count, we can send a request to the URL: /livebox/Getsavedallpushurlscount.
HTTP Request: POST
{
"username" : "api_user",
"key" : "################"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
{
"retryattempts" : "50",
"forcerestart" : "1"
}
Parameters | Type | Description |
---|---|---|
retryattempts | string | The number of retry attempts |
forcerestart | string | The number of restarts |
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################"}' -H "Content-Type: application/json" -X https://server_url/livebox/Getsavedallpushurlscount
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/Getsavedallpushurlscount')
xhr.send(params);
$.post("https://server_url/livebox/Getsavedallpushurlscount",
{
"username" : "api_user",
"key" : "################"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/Getsavedallpushurlscount'
obj = {
"username" : "api_user",
"key" : "################"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user",
"key" : "################"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/Getsavedallpushurlscount", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/Getsavedallpushurlscount";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/Getsavedallpushurlscount")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user",
"key" : "################"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user",
"key" : "################"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/Getsavedallpushurlscount", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/Getsavedallpushurlscount';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To modify push url retry & restart count, the user need to have their own channel then, we can send a request to the URL: /livebox/SetNewallpushcounts.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channel | string | The name of the channel |
retryattempts | string | The number of retry attempts |
restartcount | string | The restart count in hours |
Sample Response : Changed successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channel" : "Channel-1","retryattempts" : "10","restartcount" : "1"}' -H "Content-Type: application/json" -X https://server_url/livebox/SetNewallpushcounts
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channel" : "Channel-1","retryattempts" : "10","restartcount" : "1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/SetNewallpushcounts')
xhr.send(params);
$.post("https://server_url/livebox/SetNewallpushcounts",
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/SetNewallpushcounts'
obj = {
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/SetNewallpushcounts", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/SetNewallpushcounts";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channel\": \"Channel-1\",\n" +
" \"retryattempts\": \"10\",\n" +
" \"restartcount\": \"1\"\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/SetNewallpushcounts")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channel" : "Channel-1"
"retryattempts" : "10"
"restartcount" : "1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/SetNewallpushcounts", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/SetNewallpushcounts';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channel' => 'Channel-1',
'retryattempts' => '10',
'restartcount' => '1'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To add URLs in bulk, the user need to have their own channel then, we can send a request to the URL: /livebox/addbulkpushurls.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
}
Parameters | Type | Description |
---|---|---|
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
channelName | string | The name of the channel |
Bulkpushurls | string | The URLs that needs to be added |
Sample Response : Added successfully.
Response status: success
Here’s an example of requests in various programming languages :
$ curl -d'{"username" : "api_user","key" : "################","channelName" : "Channel-1","Bulkpushurls" : [url-1, url-2, url-3]}' -H "Content-Type: application/json" -X https://server_url/livebox/addbulkpushurls
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channelName" : "Channel-1","Bulkpushurls" : [url-1, url-2, url-3]});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/addbulkpushurls')
xhr.send(params);
$.post("https://server_url/livebox/addbulkpushurls",
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/addbulkpushurls'
obj = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/addbulkpushurls", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/addbulkpushurls";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
" \"Bulkpushurls\": \"[url-1, url-2, url-3]\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/addbulkpushurls")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
"Bulkpushurls" : [url-1, url-2, url-3]
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/addbulkpushurls", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/addbulkpushurls';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
'Bulkpushurls' => array('url-1', 'url-2', 'url-3')
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
To get the push destination live status, the user need to have their own channel then, we can send a request to the URL: /livebox/PushURLStreamingStatus.
HTTP Request: POST
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
Parameters | Type | Description |
---|---|---|
channelName | string | The name of the channel |
Livebox username | string | The username for the push destination |
key | string | The password for the push destination |
Here’s an example of requests in various programming languages :
$ curl -d '{"username" : "api_user","key" : "################","channelName" : "Channel-1"}' -H "Content-Type: application/json" -X https://server_url/livebox/PushURLStreamingStatus
var xhr = new XMLHttpRequest();
var params = JSON.stringify({"username" : "api_user","key" : "################","channelName" : "Channel-1"});
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {};
xhr.open('POST','https://server_url/livebox/PushURLStreamingStatus')
xhr.send(params);
$.post("https://server_url/livebox/PushURLStreamingStatus",
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
function(data ,status){});
import requests
url = 'https://server_url/livebox/PushURLStreamingStatus'
obj = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
x = requests.post(url, data = obj)
print(x.text)
var values = new Dictionary<string, string>
{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://server_url/livebox/PushURLStreamingStatus", content);
var responseString = await response.Content.ReadAsStringAsync();
public class Post_Request_Apache_HttpClient {
public void createEmployee() throws ClientProtocolException, IOException {
String postEndpoint = "https://server_url/livebox/PushURLStreamingStatus";
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(postEndpoint);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
String inputJson = "{\n" +
" \"username\": \"api_user\",\n" +
" \"key\": \"################\"\n" +
" \"channelName\": \"Channel-1\",\n" +
"}";
StringEntity stringEntity = new StringEntity(inputJson);
httpPost.setEntity(stringEntity);
HttpResponse response = httpclient.execute(httpPost);
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://server_url/livebox/PushURLStreamingStatus")
header = {'Content-Type': 'text/json'}
user = {
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
func MakeRequest() {
message := map[string]interface{}{
"username" : "api_user"
"key" : "################"
"channelName" : "Channel-1"
}
bytesRepresentation, err := json.Marshal(message)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post("https://server_url/livebox/PushURLStreamingStatus", "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
}
<?php
$url = 'https://server_url/livebox/PushURLStreamingStatus';
$ch = curl_init($url);
$jsonData = array(
'username' => 'api_user',
'key' => '################',
'channelName' => 'Channel-1',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
About Livebox
Live streaming servers, Live Streaming Software, OTT Toolkit, Ad Monetization on Video Player, Video Conferencing, Whitelabelling options, API for developers, Internet Bonding Devices, Live Video Encoders and much more.
Solutions
Head Office
CD TECH Innovations Pvt Ltd
#95, Pantheon Road,
Egmore, Chennai, TN
INDIA 600008
Welcome to
Livebox
Schedule a live demo with our live experts to see how Livebox™ can help you to do live streaming the expert way.
The Future of
Live Streaming is here
The professional way to stream, Encode and Transcode live streams 24/7.
Welcome to
Livebox
Schedule a live demo with our live experts to see how Livebox™ can help you to do live streaming the expert way.
Live Streaming is here