Broadcast Database Monitoring API

Callback URL for Broadcast Database Monitoring

You can set Callback URL for monitoring results by the following steps: select the project under Broadcast Database Monitoring projects then click “Action” —> click “Set Result Callback” in the dropdown menu —> input the callback URL and click “Update”.

The system will post “stream_id”, “stream_url”,”status” and monitoring results “data” (json format) to the callback URL

Field NameTypeDescription
bucket_idstringCustom bucket ID
stream_idstringthe channel id in broadcast database
stream_namestringChannel Name
stream_countrystringCountry of the channel
stream_urlstringthe stream url (empty)
user_defineddictionaryCustom ID or user defined field
datastringthe monitoring result with json format
statusinteger0: no result
1: detected a result

PHP Examples:
For “JSON” Post Type:

For “Form” Post Type:

Monitoring API for Broadcast Database

Please find the access key on the project page and change “YYYYMMDD” to change the date of the results:

https://api.acrcloud.com/v1/acrcloud-monitor-streams/{channel_id}/results?access_key={project access_key}&date={YYYYMMDD}

 

Callback URL for Stream Status of Broadcast Database

You can set Callback URL for streams (that added by yourself) status of the broadcast database by the following steps: select the project under Broadcast Database Monitoring projects then click“Action” —> click ”Set State Callback” in the dropdown menu —> input “State Callback URL” and click “Update”.

action: POST
type: JSON
data:

Fields description:

nametypedescription
stream_idstringstream id
statusstringstream status
codeintstream status code
typestringstream type (audio, video or unknown)
timestampstringstatus UTC timestamp

Status description:
codestatusdescription
0runningThe stream is working
1timeoutThe stream is currently not stable, no results will be shown at the moment, the system will try to rectify the stream, and in the meantime why not use another stream link.
6invalid URLThe stream URL has a problem, our system can not access the stream, please check the stream or change to another stream URL.

 

Console API for Broadcast Database

You can use the following code to get the list of the channels in the project, please refer to the code here.