Monitoring API

Monitoring Result API

broadcast monitoring
Please get the “access_key” from the Broadcast Monitoring project and click the project name to find the “id” on Stream Management page.

Get last results:

This API will get the last result that the monitor service detects from the stream.

Get current results:

This API will get the last result that displayed “no result”, when it doesn’t detect any result.

Get multiple last results:

This API will get multiple last results, from the last 1 result to the last 100 results, change “n” to change the number of results.
https://api.acrcloud.com/v1/monitor-streams/{stream_id}/results?access_key={access_key}&limit={n}

Get full day results in last 30 days:

This API will get full day results in last 30 days, change “YYYYMMDD” to change the date. If the date is current day, then the results are till the moment you call this API. Timezone is UTC.
https://api.acrcloud.com/v1/monitor-streams/{stream_id}/results?access_key={access_key}&date={YYYYMMDD}

Get results of any past month:

This API will get full month monitoring results of any past month, change “YYYYMM” to select the month.
https://monitoring-result.acrcloud.com/{accress_key}/{stream_id}/{YYYYMM}.zip

Get results in a certain period of the last 24 hours:

This API will get monitoring results in a certain period of the last 24 hours, change “YYYYMMDDHHMMSS” to select the period, if “end_time” was empty, then “end_time” is now. Timezone is UTC.
https://api.acrcloud.com/v1/monitor-streams/{stream_id}/results?access_key={access_key}&begin_time={YYYYMMDDHHMMSS}&end_time={YYYYMMDDHHMMSS}

Callback URL for Monitoring Results
CallbackURL

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

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

Field NameTypeDescription
stream_idstringthe stream id in acrcloud
stream_urlstringthe stream url
datastringthe monitoring result with json format
statusinteger0: no result
1: detected a result

Callback URL for Stream Status

CallbackURL-streamstatus
You can set Callback URL for stream status by the following steps: select the project under Broadcast Monitoring projects then click“Action” —> click ”Stream Status Notification” in the dropdown menu —> input “Callback URL” and click “Update”.

You can also setup the email notification by entering the “Email” and “Email Notification Frequency”.

action: POST
type: JSON
data:

Fields description:

nametypedescription
access_keystringproject access_key
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.