GoalBit Suite API Reference

The GoalBit Suite API is a REST-based API for accessing the content (Live and VoD) managed by a GoalBit Suite Platform.
To prevent unauthorized access to the platform, the GoalBit Suite protects access to the API with SSL credentials when making API calls (HTTPS calls).

Before using this API, you need to ask your provider for the access credentials and the API URL.

The GoalBit Suite API includes the following modules:

In addition, this reference describes the following related types:

Live Content API

Methods

 

find_all_signals ( content_type:ContentsFilterType, page_size:Int, page_number:Int, sort_by:LiveSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

Searches live signals according to the criteria provided by the branch. The result can be paged using the second and third parameters: the second (page_size) indicates the number of rows per page, while the third one (page_number) indicates the page that you want to display. So, if there is 100 live contents in the platform available for the branch, and the page_size is 50, then page_number can take two values: 0 to see the first 50 contents, and 1 to see the last 50 contents.

Arguments

Name Type Description
content_type (optional) ContentsFilterType Content type to return, by default ALL_CONTENT
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) LiveSortByType Specifies the field to sort by, by default ORDER_BY_CONTENT_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_ASC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of live signals is returned with the following structure:
            
["page_query_rows"]=> Number of rows in current page.
["full_pages_num"]=> Total number of rows.
["signal_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["signal_id"]=> Signal ID.
    ["certificate_cn"]=> Certificate common name.
    ["xmltv_channel_id"]=> Signal textual ID.
    ["bitrate"]=> Bitrate.
    ["broadcaster_active"]=> 1 if the broascaster of the sigal is active.
    ["broadcaster_streaming"]=> 1 if the signal is playing.
    ["regdate"]=> Registry date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/find_all_signals/[content_type]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/find_all_signals/

# JSON Output:
{"response":{"page_query_rows":1,"signal_list":[{"signal_id":"1","certificate_cn":"centos-local-suite.goalbit-solutions.com-broadcaster-1","xmltv_channel_id":"testing-signal","bitrate":"352","broadcaster_active":"1","broadcaster_streaming":"1","regdate":"2011-02-04 17:22:34"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(1)
    ["signal_list"]=>
    array(1) {
      [0]=>
      array(7) {
        ["signal_id"]=>
        string(1) "1"
        ["certificate_cn"]=>
        string(54) "centos-local-suite.goalbit-solutions.com-broadcaster-1"
        ["xmltv_channel_id"]=>
        string(14) "testing-signal"
        ["bitrate"]=>
        string(3) "352"
        ["broadcaster_active"]=>
        string(1) "1"
        ["broadcaster_streaming"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-02-04 17:22:34"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_signals_by_cn ( content_type:ContentsFilterType, keyword:String, page_size:Int, page_number:Int, sort_by:LiveSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_signals(), except that using this method you can filter by a certain keyword.

Arguments

Name Type Description
content_type ContentsFilterType Content type to return
keyword String Returns only the signals which textual content ID or certificate CN matches this keyword.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) LiveSortByType Specifies the field to sort by, by default ORDER_BY_CONTENT_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_ASC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of live signals is returned with the following structure:
            
["page_query_rows"]=> Number of rows in current page.
["full_pages_num"]=> Total number of rows.
["signal_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["signal_id"]=> Signal ID.
    ["certificate_cn"]=> Certificate common name.
    ["xmltv_channel_id"]=> Signal textual ID.
    ["bitrate"]=> Bitrate.
    ["broadcaster_active"]=> 1 if the broascaster of the sigal is active.
    ["broadcaster_streaming"]=> 1 if the signal is playing.
    ["regdate"]=> Registry date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/find_signals_by_cn/[content_type]/[keyword]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/find_signals_by_cn/1/test

# JSON Output:
{"response":{"page_query_rows":1,"signal_list":[{"signal_id":"1","certificate_cn":"centos-local-suite.goalbit-solutions.com-broadcaster-1","xmltv_channel_id":"testing-signal","bitrate":"352","broadcaster_active":"1","broadcaster_streaming":"1","regdate":"2011-02-04 17:22:34"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(1)
    ["signal_list"]=>
    array(1) {
      [0]=>
      array(7) {
        ["signal_id"]=>
        string(1) "1"
        ["certificate_cn"]=>
        string(54) "centos-local-suite.goalbit-solutions.com-broadcaster-1"
        ["xmltv_channel_id"]=>
        string(14) "testing-signal"
        ["bitrate"]=>
        string(3) "352"
        ["broadcaster_active"]=>
        string(1) "1"
        ["broadcaster_streaming"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-02-04 17:22:34"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

update_signal_status ( signal_id:Int, signal_status:Int ):APIResultsContainer

This function allows to change the status of a live signal.

Arguments

Name Type Description
signal_id Int Signal ID to change the state.
signal_status Int Indicates the new status of the live content: 0 to stop the signal, 1 to play the signal.

Returns

Type Description
APIResultsContainer Inside the "response" field, and if success, 1 is returned.

Usage

Query build (HTTP POST):
https://api.goalbit-solutions.com:10100/live_content/update_signal_status
POST DATA: {\"signal_id\":[signal_id],\"signal_status\":[signal_status]}

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/update_signal_status -d "{\"signal_id\":1,\"signal_status\":1}"

# JSON Output:
{"response":1,"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  int(1)
  ["status"]=>
  int(0)
}
 

create_certificate ( certificate_type: CertificatesType, user_id: Int, textual_signal_id:String ):APIResultsContainer

This function allows to create a new certificate.

Arguments

Name Type Description
certificate_type CertificatesType Type of certificate to create.
user_id Int ID of the user (needed when certificate_type = USER_CERTIFICATE).
textual_signal_id String Textual signal ID (needed when certificate_type = BRANCH_CERTIFICATE).

Returns

Type Description
APIResultsContainer Inside the "response" field the certificate common name is returned.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/create_certificate/[certificate_type]/[user_id]/[textual_signal_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/create_certificate/2/20

# JSON Output:
{"response":{"certificate_cn":"user-broad-691510577-branch-main-20"},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(1) {
    ["certificate_cn"]=>
    string(35) "user-broad-691510577-branch-main-20"
  }
  ["status"]=>
  int(0)
}

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/create_certificate/1/0/new-testing-signal

# JSON Output:
{"response":{"certificate_cn":"branch-broad-213667115-branch-main-new-testing-signal"},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(1) {
    ["certificate_cn"]=>
    string(55) "branch-broad-213667115-branch-main-new-testing-signal"
  }
  ["status"]=>
  int(0)
}
 

create_signal ( certificate_cn: String, textual_signal_id: String, content_type: ContentsFilterType, streaming: Int, sign_active: Int, auth_active: Int ):APIResultsContainer

This function allows to create a new live signal.

Arguments

Name Type Description
certificate_cn String Certificate common name for the new signal.
textual_signal_id String Textual signal ID to create.
content_type ContentsFilterType Content type for the signal (BRANCH_CONTENT or USER_CONTENT).
streaming Int 1 if the broadcaster is already streaming, 0 otherwise.
sign_active Int 1 if the signal content is signed, 0 otherwise.
auth_active Int 1 if the signal uses authorization, 0 otherwise.

Returns

Type Description
APIResultsContainer Inside the "response" field the signal ID is returned.

Usage

Query build (HTTP POST):
https://api.goalbit-solutions.com:10100/live_content/create_signal
POST DATA: {\"certificate_cn\":\"[certificate_cn]\",\"xmltv_id\":\"[textual_signal_id]\",\"content_type\":[content_type],\"streaming\":[streaming],\"sign_active\":[sign_active],\"auth_active\":[auth_active]}

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/create_signal -d "{\"certificate_cn\":\"user-broad-691510577-branch-main-20\",\"xmltv_id\":\"new-user-signal\",\"content_type\":3,\"streaming\":0,\"sign_active\":0,\"auth_active\":1}"

# JSON Output:
{"response":3,"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  int(3)
  ["status"]=>
  int(0)
}

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/create_signal -d "{\"certificate_cn\":\"user-broad-691510577-branch-main-20\",\"xmltv_id\":\"testing-signal\",\"content_type\":2,\"streaming\":0,\"sign_active\":0,\"auth_active\":1}"

# JSON Output:
{"status":1,"status_msg":"The content ID \"testing-signal\" already exist in our database"}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(1)
  ["status_msg"]=>
  string(61) "The content ID "testing-signal" already exist in our database"
}
 

get_signal_credentials ( signal_id:Int ):APIResultsContainer

This function allows to download the credentials (certificate pair and CA certificate) of a live signal.

Arguments

Name Type Description
signal_id Int Signal ID.

Returns

Type Description
APIResultsContainer Inside the "response" field, the credentials are returned with the following structure:
            
["page_query_rows"]=> Number of rows in current page.
["full_pages_num"]=> Total number of rows.
["signal_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["file_name"]=> Name of the downloaded file.
    ["file_size"]=> Size (in bytes) of the downloaded file.
    ["file_data"]=> Content of the downloaded file (Base64-encoded). 
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/get_signal_credentials/[signal_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_signal_credentials/1

# After JSON decodification:
array(2) {
  ["response"]=>
  array(3) {
    ["file_name"]=>
    string(44) "centos-local-suite.goalbit-solutions.com.zip"
    ["file_data"]=>
    string(4912) "UEsDBBQAAAAIALeIfj4d5NjLBw......."
    ["file_size"]=>
    int(3683)
  }
  ["status"]=>
  int(0)
}
 

get_streaming_url ( signal_id:Int, user_ip:String, streaming_type:String, user_id:Int, tracking_ref:Int ):APIResultsContainer

This function returns the URL where to get the stream of a live content.

Arguments

Name Type Description
signal_id Int Signal ID.
user_ip String IP of the user who will play the stream.
streaming_type String Type of streaming technology to use: "goalbit" or "flash"
user_id (optional) String ID of the user (relative to the branch) who will play the stream, used only for statistical purposes.
tracking_ref (optional) String Tracking reference, used only for statistical purposes. Useful when building campaigns.

Returns

Type Description
APIResultsContainer Inside the "response" field, a URL is returned with the following structure:
If ( streaming_type == 'goalbit' ):

array(1) {
  ["url"]=> GoalBit URL
}

If ( streaming_type == 'flash' ):

array(2) {
  ["server_url"]=> RTMP URL
  ["stream_id"]=> Stream ID
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/get_streaming_url/[signal_id]/[user_ip]/[streaming_type]/[user_id]/[tracking_ref]

Examples

# GoalBit Example:
curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_streaming_url/1/127.0.0.1/goalbit

# JSON Output:
{"response":{"url":"http:\/\/centos-local-suite.goalbit-solutions.com\/user_services_api\/live_content\/get_transport_data\/1\/testing-signal\/8yv47vwj7a4qr2ya21ryv68lgpbd1uz8t3mwab6p9mktzq3flo"},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(1) {
    ["url"]=>
    string(165) "http://centos-local-suite.goalbit-solutions.com/user_services_api/live_content/get_transport_data/1/testing-signal/8yv47vwj7a4qr2ya21ryv68lgpbd1uz8t3mwab6p9mktzq3flo"
  }
  ["status"]=>
  int(0)
}

# Flash Example:
curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_streaming_url/1/127.0.0.1/flash

# JSON Output:
{"response":{"server_url":"rtmp:\/\/centos-local-suite.goalbit-solutions.com\/rtplive","stream_id":"testing-signal?token=0oq0uig9n3vfw62royb24inedb0c17gr6z5ot6b3jdrk9fn0mw"},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["server_url"]=>
    string(55) "rtmp://centos-local-suite.goalbit-solutions.com/rtplive"
    ["stream_id"]=>
    string(71) "testing-signal?token=0oq0uig9n3vfw62royb24inedb0c17gr6z5ot6b3jdrk9fn0mw"
  }
  ["status"]=>
  int(0)
}
 

get_signal_thumbs ( signal_id:Int ):APIResultsContainer

This function allows to get the last thumbs generated for a live content.

Arguments

Name Type Description
signal_id Int Signal ID.

Returns

Type Description
APIResultsContainer Inside the "response" field, the last 5 thumbs captured are returned with the following structure:
            
array(5) {
  [1..5]=>
  array(2) {
    ["thumb_content"]=> Content of the Nth thumb in PNG format (Base64-encoded), prefixed with "data:base64,".
    ["regdate"]=> Date of the Nth thumb.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/get_signal_thumbs/[signal_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_signal_thumbs/1

# After JSON decodification:
array(2) {
  ["response"]=>
  array(5) {
    [1]=>
    array(2) {
      ["thumb_content"]=>
      string(172028) "data:base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAC0....."
      ["regdate"]=>
      string(19) "2011-03-30 17:48:59"
    }
    .....
    [5]=>
    array(2) {
      ["thumb_content"]=>
      string(172028) "data:base64,ihdoidhfpoffufuiorhfffAAUAAAAC0....."
      ["regdate"]=>
      string(19) "2011-03-30 17:47:59"
    }
  }
  ["status"]=>
  int(0)
}
 

get_signal_thumb ( signal_id:Int, thumb_id:Int ):APIResultsContainer

This function allows to get the Nth(thumb_id) thumb generated for a live signal.

Arguments

Name Type Description
signal_id Int Signal ID.
thumb_id Int Thumb ID, value from 1 to 5.

Returns

Type Description
APIResultsContainer Inside the "response" field, the last Nth thumb is returned with the following structure:
            
array(2) {
  ["thumb_content"]=> Content of the Nth thumb in PNG format (Base64-encoded), prefixed with "data:base64,".
  ["regdate"]=> Date of the Nth thumb.
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/get_signal_thumb/[signal_id]/[thumb_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_signal_thumb/1/1

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
      ["thumb_content"]=>
      string(172028) "data:base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAC0....."
      ["regdate"]=>
      string(19) "2011-03-30 17:48:59"
  }
  ["status"]=>
  int(0)
}
 

get_web_broadcast_data ( signal_id: Int, user_id: Int, user_ip: String ):APIResultsContainer

This function allows to get the neccesary data for broadcasting a live signal from the web.

Arguments

Name Type Description
signal_id Int Signal ID.
user_id Int User ID.
user_ip String IP address of the host from where the web broadcast will be done.

Returns

Type Description
APIResultsContainer Inside the "response" field, the neccesary data for broadcasting the signal from the web is returned with the following structure:
array(3) {
  ["certificates_url"]=> URL from where to download the certificates for broadcasting the signal.
  ["controller_url"]=> URL of the controller for the broadcasting process to announce with the suite.
  ["xmltv_id"]=> Textual signal ID.
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/live_content/get_web_broadcast_data/[signal_id]/[user_id]/[user_ip]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/live_content/get_web_broadcast_data/3/20/127.0.0.1

# JSON Output:
{"status":0,"response":{"certificates_url":"http:\/\/local-suite.goalbit-solutions.com\/user_services_api\/live_content\/get_web_broadcast_certificates\/8tt7k43orzmwlgcc33qpvygs52ufglni3xtbn74rf01fstect5\/user-broad-691510577-branch-main-20","controller_url":"https:\/\/local-suite.goalbit-solutions.com:10100\/user_services_api\/control_broadcaster\/announce","xmltv_id":"new-user-signal"}}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(0)
  ["response"]=>
  array(3) {
    ["certificates_url"]=>
    string(189) "http://local-suite.goalbit-solutions.com/user_services_api/live_content/get_web_broadcast_certificates/8tt7k43orzmwlgcc33qpvygs52ufglni3xtbn74rf01fstect5/user-broad-691510577-branch-main-20"
    ["controller_url"]=>
    string(94) "https://local-suite.goalbit-solutions.com:10100/user_services_api/control_broadcaster/announce"
    ["xmltv_id"]=>
    string(15) "new-user-signal"
  }
}

VoD Content API

Methods

 

find_all_videos ( page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

Searches on demand content according to the criteria provided by the branch. The result can be paged using the second and third parameters: the second (page_size) indicates the number of rows per page, while the third one (page_number) indicates the page that you want to display. So, if there are 100 on remand contents in the platform available for the branch, and the page_size is 50, then page_number can take two values: 0 to see the first 50 contents, and 1 to see the last 50 contents.

Arguments

Name Type Description
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_all_videos/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_all_videos/

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":3,"video_list":[{"transaction_id":"84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5","vod_transaction_status":"generating","video_id":"1","name":"testing_video","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:41"},{"transaction_id":"pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i","vod_transaction_status":"generating","video_id":"2","name":"Guion1","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:51"},{"transaction_id":"hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us","vod_transaction_status":"generating","video_id":"3","name":"video_recorded_20100424_130257","status":"active","with_authorization":"1","regdate":"2011-03-30 16:52:03"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(3)
    ["video_list"]=>
    array(3) {
      [0]=>
      array(7) {
        ["transaction_id"]=>
        string(50) "84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(13) "testing_video"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:41"
      }
      [1]=>
      array(7) {
        ["transaction_id"]=>
        string(50) "pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["video_id"]=>
        string(1) "2"
        ["name"]=>
        string(6) "Guion1"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:51"
      }
      [2]=>
      array(7) {
        ["transaction_id"]=>
        string(50) "hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["video_id"]=>
        string(1) "3"
        ["name"]=>
        string(30) "video_recorded_20100424_130257"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:52:03"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_all_non_deleted_videos ( page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can get the subset of non deleted videos.

Arguments

Name Type Description
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_all_non_deleted_videos/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_all_non_deleted_videos

# JSON Output:
{"response":{"page_query_rows":1,"video_list":[{"transaction_id":"suqune3s400yul7izcn9wugdkoiazv1dgr0v7fdtoa7z44xruy","vod_transaction_status":"completed","video_id":"1","name":"BigBuckBunny_320x180","status":"active","with_authorization":"1","regdate":"2011-08-16 09:06:12"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(1)
    ["video_list"]=>
    array(1) {
      [0]=>
      array(7) {
        ["transaction_id"]=>
        string(50) "suqune3s400yul7izcn9wugdkoiazv1dgr0v7fdtoa7z44xruy"
        ["vod_transaction_status"]=>
        string(9) "completed"
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(20) "BigBuckBunny_320x180"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-08-16 09:06:12"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_videos_by_keyword ( keyword:String, page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can filter by a certain keyword (part of the content name).

Arguments

Name Type Description
keyword String Returns only the VoD contents which name contains this keyword.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_videos_by_keyword/[keyword]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_videos_by_keyword/test

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":1,"video_list":[{"transaction_id":"84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5","vod_transaction_status":"generating","video_id":"1","name":"testing_video","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:41"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(1)
    ["video_list"]=>
    array(1) {
      [0]=>
      array(7) {
        ["transaction_id"]=>
        string(50) "84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(13) "testing_video"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:41"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_new_videos ( date:Date, page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can filter by content registration date (getting only those contents added after the specified date).

Arguments

Name Type Description
date Date Returns only the VoD contents added after the specified date.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(7) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_new_videos/[date]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_new_videos/2011-03-01

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":3,"video_list":[{"video_id":"3","name":"video_recorded_20100424_130257","status":"active","with_authorization":"1","regdate":"2011-03-30 16:52:03","vod_transaction_status":"generating","transaction_id":"hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"},{"video_id":"2","name":"Guion1","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:51","vod_transaction_status":"generating","transaction_id":"pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"},{"video_id":"1","name":"testing_video","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:41","vod_transaction_status":"generating","transaction_id":"84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(3)
    ["video_list"]=>
    array(3) {
      [0]=>
      array(7) {
        ["video_id"]=>
        string(1) "3"
        ["name"]=>
        string(30) "video_recorded_20100424_130257"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:52:03"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"
      }
      [1]=>
      array(7) {
        ["video_id"]=>
        string(1) "2"
        ["name"]=>
        string(6) "Guion1"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:51"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"
      }
      [2]=>
      array(7) {
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(13) "testing_video"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:41"
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_deleted_videos ( date:Date, page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can filter by content deletion date (getting only those contents deleted after the specified date).

Arguments

Name Type Description
date Date Returns only the VoD contents deleted after the specified date.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(8) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
    ["deldate"]=> Deletion date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_deleted_videos/[date]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_deleted_videos/2011-03-01

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":1,"video_list":[{"video_id":"2","name":"Guion1","status":"deleted","with_authorization":"1","regdate":"2011-03-30 16:51:51","deldate":"2011-03-30 18:22:33"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(1)
    ["video_list"]=>
    array(1) {
      [0]=>
      array(6) {
        ["video_id"]=>
        string(1) "2"
        ["name"]=>
        string(6) "Guion1"
        ["status"]=>
        string(7) "deleted"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:51"
        ["deldate"]=>
        string(19) "2011-03-30 18:22:33"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_userIP_videos ( userIP:String, page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can filter by the IP address of the user that added the contents (getting only those contents uploaded from the specified IP).

Arguments

Name Type Description
userIP Date Returns only the VoD contents uploaded from the specified IP.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total nmber of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(8) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
    ["deldate"]=> Deletion date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_userIP_videos/[IP]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_userIP_videos/192.168.56.1

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":3,"video_list":[{"video_id":"3","name":"video_recorded_20100424_130257","status":"active","with_authorization":"1","regdate":"2011-03-30 16:52:03","deldate":null,"vod_transaction_status":"generating","transaction_id":"hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"},{"video_id":"2","name":"Guion1","status":"deleted","with_authorization":"1","regdate":"2011-03-30 16:51:51","deldate":"2011-03-30 18:22:33","vod_transaction_status":"deleting","transaction_id":"pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"},{"video_id":"1","name":"testing_video","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:41","deldate":null,"vod_transaction_status":"generating","transaction_id":"84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(3)
    ["video_list"]=>
    array(3) {
      [0]=>
      array(8) {
        ["video_id"]=>
        string(1) "3"
        ["name"]=>
        string(30) "video_recorded_20100424_130257"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:52:03"
        ["deldate"]=>
        NULL
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"
      }
      [1]=>
      array(8) {
        ["video_id"]=>
        string(1) "2"
        ["name"]=>
        string(6) "Guion1"
        ["status"]=>
        string(7) "deleted"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:51"
        ["deldate"]=>
        string(19) "2011-03-30 18:22:33"
        ["vod_transaction_status"]=>
        string(8) "deleting"
        ["transaction_id"]=>
        string(50) "pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"
      }
      [2]=>
      array(8) {
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(13) "testing_video"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:41"
        ["deldate"]=>
        NULL
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

find_userID_videos ( userID:String, page_size:Int, page_number:Int, sort_by:VoDSortByType, sort_order:SortOrderType, get_item_count:Int ):APIResultsContainer

This is the same as find_all_videos(), except that using this method you can filter by the username of the user that added the contents (getting only those contents uploaded by the specified username).

Arguments

Name Type Description
userID String Returns only the VoD contents uploaded by the specified user.
page_size (optional) Int Number of rows per page, by default 20
page_number (optional) Int Page number, by default 0.
sort_by (optional) VoDSortByType Specifies the field to sort by, by default ORDER_BY_VIDEO_ID.
sort_order (optional) SortOrderType Specifies the direction to sort in, by default SORT_ORDER_DESC.
get_item_count (optional) Boolean If true, also return how many total results there are, by default 0.

Returns

Type Description
APIResultsContainer Inside the "response" field, a collection of VoD contents is returned with the following structure:
["page_query_rows"]=> Number of rows in current page.
["full_query_rows"]=> Total number of rows in the query.
["full_pages_num"]=> Total number of pages.
["video_list"]=>
array(N) {
  [N]=>
  array(8) {
    ["transaction_id"]=> VoD transaction ID generated when the content was added for the first time.
    ["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
    ["video_id"]=> VoD content ID.
    ["name"]=> Name of the content (asset).
    ["status"]=> Status of the video.
    ["with_authorization"]=> 1 if the end-users require authorization to watch the video.
    ["regdate"]=> Registration date.
    ["deldate"]=> Deletion date.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/find_userID_videos/[username]/[page_size]/[page_number]/[sort_by]/[sort_order]/[get_item_count]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/find_userID_videos/Services

# JSON Output:
{"response":{"page_query_rows":0,"video_list":[]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(0)
    ["video_list"]=>
    array() {
    }
  }
  ["status"]=>
  int(0)
}


# JSON Output:
{"response":{"page_query_rows":3,"video_list":[{"video_id":"3","name":"video_recorded_20100424_130257","status":"active","with_authorization":"1","regdate":"2011-03-30 16:52:03","deldate":null,"vod_transaction_status":"generating","transaction_id":"hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"},{"video_id":"2","name":"Guion1","status":"deleted","with_authorization":"1","regdate":"2011-03-30 16:51:51","deldate":"2011-03-30 18:22:33","vod_transaction_status":"deleting","transaction_id":"pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"},{"video_id":"1","name":"testing_video","status":"active","with_authorization":"1","regdate":"2011-03-30 16:51:41","deldate":null,"vod_transaction_status":"generating","transaction_id":"84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"}]},"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  array(2) {
    ["page_query_rows"]=>
    int(3)
    ["video_list"]=>
    array(3) {
      [0]=>
      array(8) {
        ["video_id"]=>
        string(1) "3"
        ["name"]=>
        string(30) "video_recorded_20100424_130257"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:52:03"
        ["deldate"]=>
        NULL
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"
      }
      [1]=>
      array(8) {
        ["video_id"]=>
        string(1) "2"
        ["name"]=>
        string(6) "Guion1"
        ["status"]=>
        string(7) "deleted"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:51"
        ["deldate"]=>
        string(19) "2011-03-30 18:22:33"
        ["vod_transaction_status"]=>
        string(8) "deleting"
        ["transaction_id"]=>
        string(50) "pn8ggyki52j4t24iy81wi0fn08tbcjuq5ory26hfzw32gaft2i"
      }
      [2]=>
      array(8) {
        ["video_id"]=>
        string(1) "1"
        ["name"]=>
        string(13) "testing_video"
        ["status"]=>
        string(6) "active"
        ["with_authorization"]=>
        string(1) "1"
        ["regdate"]=>
        string(19) "2011-03-30 16:51:41"
        ["deldate"]=>
        NULL
        ["vod_transaction_status"]=>
        string(10) "generating"
        ["transaction_id"]=>
        string(50) "84ucnzqnvdokx5qxdo4c3j73xwspgs3kx4pi5xouryyzrahmj5"
      }
    }
  }
  ["status"]=>
  int(0)
}
 

get_vod_upload_URL ( userIP:String, userID:String, userData:String ):APIResultsContainer

Creates a new VoD transaction in the platform, and generates the URL needed to upload a new VoD content from the specified userID, uploaded from the specified IP address. The three parameters offers the possibility to filter VoD contents in search queries and also improve the statistics knowing the users' activities. The userData parameter is optional and can contain any relevant information associated with the user that is going to upload a new VoD content. If everything is OK the method returns the transaction ID and the VoD upload URL, otherwise it returns an empty value (NULL).

Arguments

Name Type Description
userIP String The IP address of the user that is going to upload a new VoD content.
userID String The username of the user that is going to upload a new VoD content.
userData String Other data of the user that is going to upload a new VoD content.

Returns

Type Description
APIResultsContainer Inside the "response" field, the upload URL and the corresponding transaction ID are returned with the following structure:
["url"]=> The URL where to upload a new VoD content for the specified user.
["transaction_id"]=> The transaction ID created to manage the VoD content upload.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_vod_upload_URL/[IP]/[username]/[user-data]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_vod_upload_URL/192.168.100.1/myUser/Testing

# JSON Output:
{"status":0,"response":{"url":"http:\/\/centos-local-suite.goalbit-solutions.com\/goalbit_media_server\/vod_content\/upload_new_video\/258pbnuujm6bzlexpjy7fa83k0wi10k7kmdjohgqlsud7jcfhw","transaction_id":"258pbnuujm6bzlexpjy7fa83k0wi10k7kmdjohgqlsud7jcfhw"}}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(0)
  ["response"]=>
  array(2) {
    ["url"]=>
    string(148) "http://centos-local-suite.goalbit-solutions.com/goalbit_media_server/vod_content/upload_new_video/258pbnuujm6bzlexpjy7fa83k0wi10k7kmdjohgqlsud7jcfhw"
    ["transaction_id"]=>
    string(50) "258pbnuujm6bzlexpjy7fa83k0wi10k7kmdjohgqlsud7jcfhw"
  }
}
 

get_transaction_info ( transactionID:String ):APIResultsContainer

This method returns a VoD transaction's information. Each transaction corresponds to one VoD content. This method can be used to know the status of the transaction after uploading a new VoD content. If everything is OK the method returns the information for the corresponding transaction ID, otherwise it returns an error message.

Arguments

Name Type Description
transactionID String The ID of the transaction that we want to query.

Returns

Type Description
APIResultsContainer Inside the "response" field, the transaction's information is returned with the following structure:
["transaction_id"]=> The transaction ID.
["vod_transaction_status"]=> Status of the transaction: 'inactive', 'error', 'creating', 'generating', 'analyzing', 'thumbs', 'copying', 'transcoding', 'completed', 'cancelled', 'reactivated', 'deleting', 'deleted'.
["vod_asset_id"]=> VoD content ID.
["vod_process_id"]=> Internal process ID (managed by the Scheduler of the Controller subsystem).
["start_date"]=> Date where the transaction was created.
["finish_date"]=> Date where the transaction was finished (the Controller's scheduler finished processing the corresponding VoD content uploaded for this transaction).
["branch_cn"]=> CN of the branch from where the VoD content was uploaded.
["user_ip"]=> IP address from where the corresponding VoD content was uploaded.
["user_id"]=> ID of the user who uploaded the corresponding VoD content.
["user_data"]=> Data of the user who uploaded the corresponding VoD content.
["error_log"]=> Error messages catched up by the Controller's Scheduler during the VoD content processing.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_transaction_info/[transactionID]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_transaction_info/hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us

# JSON Output:
{"status":1,"status_msg":"The transaction code is invalid."}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(1)
  ["status_msg"]=>
  string(32) "The transaction code is invalid."
}

# JSON Output:
{"status":0,"response":{"vod_transaction_id":"hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us","vod_transaction_status":"generating","vod_asset_id":"3","vod_process_id":"3","start_date":"2011-03-30 16:51:56","finish_date":null,"branch_cn":"branch-main","user_ip":"192.168.56.1","user_id":"Services","user_data":"default","error_log":null}}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(0)
  ["response"]=>
  array(11) {
    ["vod_transaction_id"]=>
    string(50) "hhqh0eb0iepbo31xic3rq860fi6fibu8e1k8q7s30t09mxb4us"
    ["vod_transaction_status"]=>
    string(10) "generating"
    ["vod_asset_id"]=>
    string(1) "3"
    ["vod_process_id"]=>
    string(1) "3"
    ["start_date"]=>
    string(19) "2011-03-30 16:51:56"
    ["finish_date"]=>
    NULL
    ["branch_cn"]=>
    string(11) "branch-main"
    ["user_ip"]=>
    string(12) "192.168.56.1"
    ["user_id"]=>
    string(8) "Services"
    ["user_data"]=>
    string(7) "default"
    ["error_log"]=>
    NULL
  }
}
 

get_video_info ( videoID:Int, streamingProfileID:String ):APIResultsContainer

This method returns a VoD content's information for a specified streaming profile. Each VoD content can be processed for different streaming profiles, and some information can vary from one profile to other, thus why the streaming profile is required. If everything is OK the method returns the content's information for the corresponding streaming profile, otherwise it returns an error message.

Arguments

Name Type Description
videoID Int The ID of the VoD content that we want to query.
streamingProfileID String The textual ID of the streaming profile that we want to query for.

Returns

Type Description
APIResultsContainer Inside the "response" field, the VoD content's information is returned with the following structure:
["vod_asset_id"]=> VoD content ID.
["file_size"]=> Size of the VoD content's file (in bytes).
["file_name"]=> Internal name of the VoD content's file.
["file_path"]=> Path of the VoD content's file, relative to the repository.
["video_duration"]=> Duration of the VoD content (in seconds)
["full_properties"]=> Properties of the VoD content (codecs, streams, format, frame rate, etc.)
["profile_name"]=> Name of the VoD content's encoding profile.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_video_info/[videoID]/[streamingProfileID]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_video_info/3/http-flash-streaming

# JSON Output:
{"status":1,"status_msg":"Error: The streaming service (flash) is not valid."}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(1)
  ["status_msg"]=>
  string(46) "Error: The streaming service (flash) is not valid."
}

# JSON Output:
{"status":0,"response":{"1":{"vod_asset_id":"3","file_size":"4469072","file_name":"3.flv","file_path":"branch-main\/FlashVideo480x360","video_duration":"70.07","full_properties":"{\"muxer\":{\"filename\":\"\/var\/content\/repo2\/branch-main\/FlashVideo480x360\/3.flv\",\"nb_streams\":\"1\",\"format_name\":\"flv\",\"format_long_name\":\"FLV format\",\"start_time\":\"0.000000 \",\"duration\":\"70.070000 \",\"size\":\"4469072.000000 \",\"bit_rate\":\"519469.000000 \"},\"streams\":[{\"codec_name\":\"h264\",\"codec_long_name\":\"H.264 \/ AVC \/ MPEG-4 AVC \/ MPEG-4 part 10\",\"codec_type\":\"video\",\"codec_time_base\":\"125\/5994\",\"codec_tag_string\":\"[0][0][0][0]\",\"codec_tag\":\"0x0000\",\"width\":\"480\",\"height\":\"360\",\"has_b_frames\":\"0\",\"sample_aspect_ratio\":\"1:1\",\"display_aspect_ratio\":\"4:3\",\"pix_fmt\":\"yuv420p\",\"r_frame_rate\":\"24000\/1001\",\"avg_frame_rate\":\"0\/0\",\"time_base\":\"1\/1000\",\"start_time\":\"0.000000 \",\"duration\":\"N\/A\",\"bitrate\":\"519\"}]}","profile_name":"FlashVideo480x360"}}}

# After JSON decodification:
array(2) {
  ["status"]=>
  int(0)
  ["response"]=>
  array(1) {
    [1]=>
    array(7) {
      ["vod_asset_id"]=>
      string(1) "3"
      ["file_size"]=>
      string(7) "4469072"
      ["file_name"]=>
      string(5) "3.flv"
      ["file_path"]=>
      string(29) "branch-main/FlashVideo480x360"
      ["video_duration"]=>
      string(5) "70.07"
      ["full_properties"]=>
      string(706) "{"muxer":{"filename":"/var/content/repo2/branch-main/FlashVideo480x360/3.flv","nb_streams":"1","format_name":"flv","format_long_name":"FLV format","start_time":"0.000000 ","duration":"70.070000 ","size":"4469072.000000 ","bit_rate":"519469.000000 "},"streams":[{"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","codec_type":"video","codec_time_base":"125/5994","codec_tag_string":"[0][0][0][0]","codec_tag":"0x0000","width":"480","height":"360","has_b_frames":"0","sample_aspect_ratio":"1:1","display_aspect_ratio":"4:3","pix_fmt":"yuv420p","r_frame_rate":"24000/1001","avg_frame_rate":"0/0","time_base":"1/1000","start_time":"0.000000 ","duration":"N/A","bitrate":"519"}]}"
      ["profile_name"]=>
      string(17) "FlashVideo480x360"
    }
  }
}
 

remove_video ( videoID:Int ):APIResultsContainer

This method removes a VoD content. After removing the content, the video will be no longer available, while the corresponding transaction will remain available with status "deleted". If everything is OK the method returns 1, otherwise it returns an error message.

Arguments

Name Type Description
videoID Int The ID of the VoD content that we want to remove.

Returns

Type Description
APIResultsContainer Inside the "response" field there's no extra information.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/remove_video/[videoID]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/remove_video/3

# JSON Output:
{"response":1,"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  int(1)
  ["status"]=>
  int(0)
}
 

set_video_authorization ( videoID:Int ):APIResultsContainer

This method configures the VoD content as using authorization. If everything is OK the method returns 1, otherwise it returns an error message.

Arguments

Name Type Description
videoID Int The ID of the VoD content that we want to configure.

Returns

Type Description
APIResultsContainer Inside the "response" field there's no extra information.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/set_video_authorization/[videoID]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/set_video_authorization/1

# JSON Output:
{"response":1,"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  int(1)
  ["status"]=>
  int(0)
}
 

unset_video_authorization ( videoID:Int ):APIResultsContainer

This method configures the VoD content as not using authorization. If everything is OK the method returns 1, otherwise it returns an error message.

Arguments

Name Type Description
videoID Int The ID of the VoD content that we want to configure.

Returns

Type Description
APIResultsContainer Inside the "response" field there's no extra information.

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/unset_video_authorization/[videoID]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/unset_video_authorization/1

# JSON Output:
{"response":1,"status":0}

# After JSON decodification:
array(2) {
  ["response"]=>
  int(1)
  ["status"]=>
  int(0)
}
 

get_vod_streaming_url ( video_id:Int, user_ip:String, streaming_service_id:String, user_id:Int, tracking_ref:Int ):APIResultsContainer

This function returns the set of URLs where to get the stream of a requested video. The number of URLs depends on the number of configured streaming profiles.

Arguments

Name Type Description
video_id Int Video ID.
user_ip String IP of the user who will play the stream.
streaming_service_id String Type of streaming technology to use ("http-flash-streaming", "p2p-goalbit-streaming" or "hls-streaming").
user_id (optional) String ID of the user (relative to the branch) who will play the stream, used only for statistical purposes.
tracking_ref (optional) String Tracking reference, used only for statistical purposes. Useful when building campaigns.

Returns

Type Description
APIResultsContainer Inside the "response" field, a set of URLs is returned with the following structure:
array(N) {
  [N]=>
  array(2) {
    ["url"]=> Video URL.
    ["encoding_profile_id"]=> Encoding profile ID of the returned video.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_streaming_url/[video_id]/[user_ip]/[streaming_service_id]/[user_id]/[tracking_ref]

Examples

# Flash HTTP Example: curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_streaming_url/1/127.0.0.1/http-flash-streaming # JSON Output: {"response":[{"url":"http:\/\/centos-local-suite.goalbit-solutions.com\/goalbit_media_server\/streamer\/?file=branch-main\/FlashVideo480x360\/1.flv&token=n0o67lhowus16854reg02qvtlamxy9qow5mb1i8pqkvg0gp9np","encoding_profile_id":"1"}],"status":0} # After JSON decodification: array(2) { ["response"]=> array(1) { [0]=> array(2) { ["url"]=> string(176) "http://centos-local-suite.goalbit-solutions.com/goalbit_media_server/streamer/?file=branch-main/FlashVideo480x360/1.flv&token=n0o67lhowus16854reg02qvtlamxy9qow5mb1i8pqkvg0gp9np" ["encoding_profile_id"]=> string(1) "1" } } ["status"]=> int(0) }
 

get_video_thumbs ( video_id:Int ):APIResultsContainer

This function allows to get the thumbs generated for a video.

Arguments

Name Type Description
video_id Int Video ID.

Returns

Type Description
APIResultsContainer Inside the "response" field, the thumbs captured are returned with the following structure:
            
array(N) {
  [1..N]=>
  array(5) {
      ["vod_asset_id"]=> Video ID.
      ["thumb_id"]=> Thumb Id.
      ["thumb_format"]=> Thumb image format ('png' or 'jpeg').
      ["thumb_size"]=> Thumb size.
      ["thumb_content"]=> Thumb content (Base64-encoded), prefixed with "data:base64,".
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_video_thumbs/[video_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_video_thumbs/1 # After JSON decodification: array(2) { ["response"]=> array(2) { [0]=> array(5) { ["vod_asset_id"]=> string(1) "1" ["thumb_id"]=> string(1) "1" ["thumb_format"]=> string(3) "png" ["thumb_size"]=> string(6) "334788" ["thumb_content"]=> string(410548) "data:base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAC0....." } [1]=> array(5) { ["vod_asset_id"]=> string(1) "1" ["thumb_id"]=> string(1) "2" ["thumb_format"]=> string(3) "png" ["thumb_size"]=> string(6) "307902" ["thumb_content"]=> string(410548) "data:base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAC0....." } } ["status"]=> int(0) }
 

get_video_thumbs_without_content ( video_id:Int ):APIResultsContainer

This function allows to get information about the thumbs generated for a video.

Arguments

Name Type Description
video_id Int Video ID.

Returns

Type Description
APIResultsContainer Inside the "response" field, the thumbs captured are returned with the following structure:
            
array(N) {
  [1..N]=>
  array(5) {
      ["vod_asset_id"]=> Video ID.
      ["thumb_id"]=> Thumb Id.
      ["thumb_format"]=> Thumb image format ('png' or 'jpeg').
      ["thumb_size"]=> Thumb size.
  }
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_video_thumbs_without_content/[video_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_video_thumbs_without_content/1 # After JSON decodification: array(2) { ["response"]=> array(2) { [0]=> array(4) { ["vod_asset_id"]=> string(1) "1" ["thumb_id"]=> string(1) "1" ["thumb_format"]=> string(3) "png" ["thumb_size"]=> string(6) "334788" } [1]=> array(4) { ["vod_asset_id"]=> string(1) "1" ["thumb_id"]=> string(1) "2" ["thumb_format"]=> string(3) "png" ["thumb_size"]=> string(6) "307902" } } ["status"]=> int(0) }
 

get_video_thumb ( video_id:Int, thumb_id:Int ):APIResultsContainer

This function allows to get the thumbs generated for a video.

Arguments

Name Type Description
video_id Int Video ID.
thumb_id Int Thumb ID, value between 0 and N (you can know this value by calling the get_video_thumbs_without_content()).

Returns

Type Description
APIResultsContainer Inside the "response" field, the thumb is returned with the following structure:
            
array(6) {
  ["vod_asset_id"]=> Video ID.
  ["thumb_id"]=> Thumb Id.
  ["thumb_format"]=> Thumb image format ('png' or 'jpeg').
  ["thumb_size"]=> Thumb size.
  ["encoded_content"]=> Thumb content (Base64-encoded), prefixed with "data:base64,".
}

Usage

Query build (HTTP GET):
https://api.goalbit-solutions.com:10100/vod_content/get_video_thumb/[video_id]/[thumb_id]

Examples

curl --cacert ca-cert.pem --cert branch-main-cert.pem --key branch-main-key.pem https://api.goalbit-solutions.com:10100/vod_content/get_video_thumb/1/2 # After JSON decodification: array(2) { ["response"]=> array(5) { ["vod_asset_id"]=> string(1) "1" ["thumb_id"]=> string(1) "2" ["thumb_format"]=> string(3) "png" ["thumb_size"]=> string(6) "307902" ["encoded_content"]=> string(410548) "data:base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAC0....." } ["status"]=> int(0) }

ErrorStatusType

Error codes returned by the APIs.

Name Type Value Description
STATUS_NO_ERROR Int 0 The function was applied successfully and returned without error.
STATUS_GENERAL_ERROR Int 1 The function returned with error. There's no warranty if any action was taken or not.
STATUS_API_ERROR Int 2 There was an error in the API communication while sending information between the platform components.

LiveSortByType

Ways that live contents within the returned set can be ordered.

Name Type Value Description
ORDER_BY_CERTIFICATE_CN Int 1 Sort the results by the certificate identifier.
ORDER_BY_CONTENT_ID Int 2 Sort the results by the live content identifier.
ORDER_BY_BITRATE Int 3 Sort the results by the live signal bitrate.
ORDER_BY_STREAMING_ACTIVE Int 4 Sort the results by the live streaming status, showing first the active ones.
ORDER_BY_STREAMING_PLAYING Int 5 Sort the results by the live streaming status, showing first the playing ones.
ORDER_BY_REGDATE Int 6 Sort the results by the live content registration date.

VoDSortByType

Ways that VoD contents within the returned set can be ordered.

Name Type Value Description
ORDER_BY_VIDEO_ID Int 10 Sort the results by the VoD content identifier.
ORDER_BY_VIDEO_DATE Int 11 Sort the results by the VoD content upload date.
ORDER_BY_VIDEO_DELDATE Int 12 Sort the results by the VoD content delete date.

SortOrderType

Directions that entities within the return set can be ordered.

Name Type Value Description
SORT_ORDER_ASC Int 1 Sort the results in ascendent order.
SORT_ORDER_DESC Int 2 Sort the results in descendent order.

CertificatesType

Different broadcasting certificates types.

Name Type Value Description
BRANCH_CERTIFICATE Int 1 Branch certificate (one certificate per signal).
USER_CERTIFICATE Int 2 User certificate (the same certificate is used for all the signals of the user).

ContentsFilterType

Content filter types.

Name Type Value Description
ALL_CONTENT Int 1 Do not filter any content.
BRANCH_CONTENT Int 2 Get only branch contents.
USER_CONTENT Int 3 Get only user contents.

APIResultsContainer

A container of APIs results. This class encapsulates a list of an item of a certain type, and also the operation status.

Name Type Description
status ErrorStatusType Operation status.
response - If success, this contains the API results.