Due to the COVID-19 restrictions, our support executives are operating from 6 AM to 11:59 PM IST.

LiveboxTM

Live Streaming API

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 Channel Details

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

Sample Request

{

“channelName” : “Channel-1”,

“username” : “apiuser”,

“key” : “################”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the conference
key string The password for the conference

Sample Response

{

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

}

Response Parameters

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
Response status: success

Requests

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

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

Sample Request

{

“channelName” : “Channel-1”,

“streamname” : “Stream-1”,

“password” : “################”

“username” : “apiuser”,

“key” : “################”

  }

Request Parameters

Parameters Type Description
channelName string The name of the channel
streamname string The name of the stream
password string The password for the stream
username string The username for the conference
key string The password for the conference

Sample Response

{

“streamurl” : “rtmp://server_name:port_number/<Channel_name>/”,

“streamkey” : “<streamname>?psk=<password>”,

}

Response Parameters

Parameters Type Description
streamurl string The url for the stream
streamkey string The key for the stream
Response status: success

Requests

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

To delete a channel, 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

Sample Request

{

“channelName” : “Channel-1”,

“username” : “apiuser”,

“key” : “################”

 }

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the conference
key string The password for the conference

Response data:  Channel deleted successfully

Response status: success

Requests

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 Get the Embed Code

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

Sample Request

{

“channelName” : “Channel-1”,

“username” : “apiuser”,

“key” : “################”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the conference
key string The password for the conference

Sample Response

{

“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>”,

}

Response status: success

Requests

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

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

Sample Request

{

“channelName” : “Channel-1”,

“password” : “################”,

“username” : “apiuser”,

“key” : “################”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
password string The password for the channel
username string The username for the conference
key string The password for the conference

Response data: Updated successfully

Response status: success

Requests

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 Start FLV Recording

To start the FLV recording, we can send a request to the url:  /livebox/api/channelRecording.

HTTP Request: POST

Request action : “on”

Sample Request

{

“username” : “api_user”,

“key” : “################”,

“recordingType” : “FLV”,

“action” : “on”,

“channelName” : “channel-1”,

“ProfileName” : “Profile-1”,

“transcodeMode” : “off”,

“transcodePreset” : “Preset-1”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1/Profile-1”,

               “record_suffix” : “filename.flv”,

               “record_unique” : “on”

               }

       }

}

Request Parameters

Parameters Type Description
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

Response status:  Changes applied successfully

Requests

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”, “channelName” : { “ProfileName” : { “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”, “channelName” : { “ProfileName” : { “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”,

“channelName” : {

       “ProfileName” : {

               “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”,

“channelName” : {

       “ProfileName” : {

               “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”,

“channelName” : {

       “ProfileName” : {

               “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\”: \”get\”,\n” +

”  \”channelName\”: \”Channel-1\”,\n” +

”  \”ProfileName\”: \”Profile-1\”\n” +

”  \”transcodeMode\”: \”off\”,\n” +

”  \”transcodePreset\”: \”Preset-1\”\n” +

”  \”channelName\”: \”{\n” +

”  \”ProfileName\”: \”{\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”,

“channelName” : {

       “ProfileName” : {

               “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”,

“channelName” : {

       “ProfileName” : {

               “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’ => ‘get’,

    ‘channelName’ => ‘Channel-1’,

    ‘ProfileName’ => ‘Profile-1’

    ‘transcodeMode’ => ‘off’;

    ‘transcodePreset’ => ‘Preset-1’,

       ‘channelName’ => array(

           ‘ProfileName’ => 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 FLV Recording

To stop the FLV recording, we can send a request to the url:  /livebox/api/channelRecording.

HTTP Request: POST

Request action : “off”

Sample Request

{

“action” : “off”,

“username” : “apiuser”,

“key” : “################”,

“channelName” : “Channel-1”,

“recordingType” : “FLV”,

“ProfileName” : “Profile-1”

}

Request Parameters

Parameters Type Description
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

Response status:  stopped

Requests

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\”: \”get\”,\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’ => ‘get’,

    ‘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 MP4/HLS Recording

To start the MP4 recording, we can send a request to the url:  /livebox/api/channelRecording.

HTTP Request: POST

Request action : “on”

Sample Request

{

“username” : “api_user”,

“key” : “################”,

“recordingType” : “HLS”,

“action” : “on”,

“channelName” : “channel-1”,

“transcodeMode” : “off”,

“transcodePreset” : “Preset-1”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “record_unique” : “on”

               }

       }

}

Request Parameters

Parameters Type Description
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

Response status:  Changes applied successfully

Requests

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”, “channelName” : { “ProfileName” : { “record” : “all”,“record_path” : “channel-1”, “record_suffix” : “api_filename”, “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” : “HLS”, “action” : “on”, “channelName” : “channel-1”, “transcodeMode” : “off”, “transcodePreset” : “Preset-1”, “channelName” : { “ProfileName” : { “record” : “all”,“record_path” : “channel-1”, “record_suffix” : “api_filename”, “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” : “HLS”,

“action” : “on”,

“channelName” : “channel-1”,

“transcodeMode” : “off”,

“transcodePreset” : “Preset-1”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “record_unique” : “on”

               }

       }

}

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”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “record_unique” : “on”

               }

       }

}

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”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “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\”: \”HLS\”,\n” +

”  \”action\”: \”get\”,\n” +

”  \”channelName\”: \”Channel-1\”,\n” +

”  \”transcodeMode\”: \”off\”,\n” +

”  \”transcodePreset\”: \”Preset-1\”\n” +

”  \”channelName\”: \”{\n” +

”  \”ProfileName\”: \”{\n” +

”  \”record\”: \”all\”,\n” +

”  \”record_path\”: \”channel-1\”\n” +

”  \”record_suffix\”: \”api_filename\”,\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” : “HLS”,

“action” : “on”,

“channelName” : “channel-1”,

“transcodeMode” : “off”,

“transcodePreset” : “Preset-1”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “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” : “HLS”,

“action” : “on”,

“channelName” : “channel-1”,

“transcodeMode” : “off”,

“transcodePreset” : “Preset-1”,

“channelName” : {

       “ProfileName” : {

               “record” : “all”,

               “record_path” : “channel-1”,

               “record_suffix” : “api_filename”,

               “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’ => ‘HLS’,

    ‘action’ => ‘get’,

    ‘channelName’ => ‘Channel-1’,

    ‘transcodeMode’ => ‘off’,

    ‘transcodePreset’ => ‘Preset-1’,

       ‘channelName’ => array(

           ‘ProfileName’ => array(

               ‘record’ => ‘all”,

               ‘record_path’ => ‘channel-1’,

               ‘record_suffix’ => ‘api_filename’,

               ‘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 MP4/HLS Recording

To stop the video recording, we can send a request to the url:  /livebox/api/channelRecording.

HTTP Request: POST

Request action : “off”

Sample Request

{

“action” : “off”,

“username” : “apiuser”,

“key” : “################”,

“channelName” : “Channel-1”,,

“recordingType” : “HLS”

“FileName” : “api_filename”

}

Request Parameters

Parameters Type Description
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

Response status:  stopped

Requests

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\”: \”get\”,\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’ => ‘get’,

    ‘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

To get channel recorded files, we can send a request to the URL: /livebox/player/api/showchannelRecordedFiles. 

HTTP Request: POST

Sample Request

{

“username” : “apiuser”,

“key” : “################”,

“channelName” : “Channel-1”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the recording
key string The password for the recording

Sample Response

{ File-1, File-2, File-3 }

Response status: success

Requests

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/player/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/player/api/showchannelRecordedFiles‘)

xhr.send(params);

$.post(“https://server_url/livebox/player/api/showchannelRecordedFiles“,

{

“username” : “apiuser”

“key” : “################”

“channelName” : “Channel-1”

}

function(data ,status){});

import requests

url = ‘https://server_url/livebox/player/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/player/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/player/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/player/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/player/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/player/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 Presets

To get all the presets, we can send a request to the URL:  /livebox/GetAllPresets

HTTP Request: POST

Sample Request

{

“username” : “api_user”,

“key” : “################”

}

Request Parameters

Parameters Type Description
username string The username for the push destination
key string The password for the push destination

Sample Response

{ Preset-1, Preset-2, Preset-3 }

Response status: success

Requests

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 URL Preset

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

“url” : “rtmp://server_rtmp_url”

“presetname” : “Preset-1”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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

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

Sample Request

{

“status” : “false”

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

“RTMPurl” : “rtmp://server_rtmp_url”

“preset” : “Preset-1”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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 Push URL Streaming ON/OFF

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

Sample Request

{

“status” : “false”

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

“RTMPurl” : “rtmp://server_rtmp_url”

“preset” : “Preset-1”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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 Channel Push URL

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the push destination
key string The password for the push destination

Sample Response

{

“Pushstatus” : “false”,

“Url” : “rtmp://server_rtmp_url”,

“forcerestart” : “0”,

“id” : “##########”,

“preset” : “Preset-1”,

“retryattempts” : “0”

}

Response Parameters

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
Response status: success

Requests

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 Push URL

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channel_name” : “Channel-1”

“urlname” : “rtmp://server_rtmp_url”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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 Push URL

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

Sample Request

{

“channelName” : “Channel-1”

“username” : “api_user”

“key” : “################”

“existurl” : “rtmp://existing_server_rtmp_url”

“newurl” : “rtmp://new_server_rtmp_url”

“preset” : “Preset-1”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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

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

Sample Request To Turn ON

{

“username” : “api_user”

“key” : “################”

“channel” : “Channel-1”

“action” : “Turn ON all”

}

Sample Request To Turn OFF

{

“username” : “api_user”

“key” : “################”

“channel” : “Channel-1”

“action” : “Turn OFF all”

}

Sample Request To Remove All

{

“username” : “api_user”

“key” : “################”

“channel” : “Channel-1”

“action” : “Remove all”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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

For push URL retry and restart count, we can send a request to the URL:  /livebox/Getsavedallpushurlscount.

HTTP Request: POST

Sample Request

{

“username” : “api_user”,

“key” : “################”

}

Request Parameters

Parameters Type Description
username string The username for the push destination
key string The password for the push destination

Sample Response

{

“retryattempts” : “50”,

“forcerestart” : “1”

}

Response Parameters

Parameters Type Description
retryattempts string The number of retry attempts
forcerestart string The number of restarts
Response status: success

Requests

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

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channel” : “Channel-1”

“retryattempts” : “10”

“restartcount” : “1”

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

“Bulkpushurls” : [url-1, url-2, url-3]

}

Request Parameters

Parameters Type Description
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:  stopped

Requests

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 Push Destination Live Status

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

Sample Request

{

“username” : “api_user”

“key” : “################”

“channelName” : “Channel-1”

}

Request Parameters

Parameters Type Description
channelName string The name of the channel
username string The username for the push destination
key string The password for the push destination
Response status: success

Requests

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);