Custom Streams Projects
post
https://api-v2.acrcloud.com
/api/bm-cs-projects
Create Custom Streams Project
Curl
Python
curl --location --request POST 'https://api-v2.acrcloud.com/api/bm-cs-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your token}' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"BM-ACRC", "external_ids":["spotify", "isrc", "deezer"]}'
import requests
url = "https://api-v2.acrcloud.com/api/bm-cs-projects"
payload = {
"name": "test",
"region": "eu-west-1",
"buckets": [
8881,
8883
],
"type": "BM-ACRC",
"external_ids": [
"spotify",
"isrc",
"deezer"
]
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {your token}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.text)
get
https://api-v2.acrcloud.com
/api/bm-cs-projects
List the projects
Curl
curl --location --request GET 'https://api-v2.acrcloud.com/api/bm-cs-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your token}'
put
https://api-v2.acrcloud.com
/api/bm-cs-projects/:id
Update a project
Python
import requests
import json
url = "http://127.0.0.1:8080/api/bm-cs-projects/13528"
payload = json.dumps({
"name": "test",
"buckets": [
8881,
8883
],
"external_ids": [
"spotify",
"isrc",
"deezer"
]
})
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
delete
https://api-v2.acrcloud.com
/api/bm-cs-projects/:id
Delete a project
post
https://api-v2.acrcloud.com
/api/bm-cs-projects/:id/result-callback
Set result callback url
CURL
curl --location --request POST 'https://api-v2.acrcloud.com//api/bm-cs-projects/12345/result-callback' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your token}' \
--header 'Content-Type: application/json' \
--data-raw '{"result_callback_url":"{your callback URL}"}'
The following is the example of the results of the monitoring system posting to your results callback URL
Sample result of Music(Callback)
{
"stream_url": "xxxx",
"stream_id": "s-Ixxxxd",
"status": 1,
"data": {
"status": {
"msg": "Success",
"version": "1.0",
"code": 0
},
"result_type": 0,
"metadata": {
"music": [{
"album": {
"name": "Creedence Clearwater Revival - Best Of"
},
"play_offset_ms": 75500,
"sample_begin_time_offset_ms": 6440,
"title": "Proud Mary",
"result_from": 3,
"release_date": "2008-01-01",
"sample_end_time_offset_ms": 9420,
"genres": [{
"name": "Country"
}, {
"name": "Pop"
}, {
"name": "Rock"
}, {
"name": "Rock & Roll/Rockabilly"
}],
"label": "Universal Music",
"duration_ms": 186506,
"score": 100.0,
"db_begin_time_offset_ms": 72200,
"artists": [{
"name": "Creedence Clearwater Revival"
}],
"db_end_time_offset_ms": 75180,
"external_ids": {
"isrc": "USFI86900049",
"upc": "888072308701"
},
"acrid": "463aeeb5840215833abe6bf7b02304f6",
"external_metadata": {
"spotify": {
"track": {
"name": "Proud Mary",
"id": "5Op2Ra4kgzlTpEmD9NUanY"
},
"album": {
"name": "Creedence Clearwater Revival - Best Of"
},
"artists": [{
"name": "Creedence Clearwater Revival"
}]
},
"lyricfind": {
"lfid": "001-1188346"
},
"youtube": {
"vid": "5hid10EgMXE"
},
"musicstory": {
"track": {
"id": "9258633"
},
"album": {
"id": "677371"
},
"release": {
"id": "1640721"
}
},
"musicbrainz": {
"track": {
"id": "1632ee2b-4f4b-42eb-909f-8279e66dc1ce"
}
},
"deezer": {
"track": {
"name": "Proud Mary",
"id": "883642"
},
"album": {
"name": "Creedence Clearwater Revival - Best Of"
},
"artists": [{
"name": "Creedence Clearwater Revival"
}]
}
}
}],
"timestamp_utc": "2022-02-22 12:19:28",
"played_duration": 173,
"type": "delay"
}
}
}
post
https://api-v2.acrcloud.com
/api/bm-cs-projects/:id/state-notification
Set state notification callback
Last modified 5mo ago