ACRCloud
Ask or search…
K
Links

Custom Streams Projects

post
https://api-v2.acrcloud.com
/api/bm-cs-projects
Create Custom Streams Project
Parameters
Header
Authorization
string
Bearer token
Accept
string
application/json
Content-Type
string
application/json
Body
external_ids
string
spotify,deezer,isrc,upc,musicbrainz
metadata_template
string
The streams metadata template
region
string
eu-west-1,us-west-2,ap-southeast-1
name
string
Project name
buckets
string
Bucket ids array
type
string
BM-ACRC or BM-LOCAL BM-ACRC: Ingesting the streams audio data on our server. BM-LOCAL: ingesting the streams audio data on your local server. Please refer to Local monitoring Tool
Responses
201
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
Parameters
Query
page
string
region
string
types
string
per_page
string
Header
Accept
string
application/json
Authorization
string
Bearer token
Responses
200
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
Parameters
Path
id
number
The project id
Header
Accept
string
application/json
Authorization
string
Bearer token
Body
name
string
buckets
string
external_ids
string
metadata_template
string
Responses
200
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
Parameters
Path
id
number
The project id
Header
Authorization
string
Bearer token
Responses
204
post
https://api-v2.acrcloud.com
/api/bm-cs-projects/:id/result-callback
Set result callback url
Parameters
Path
id
number
The project id
Header
Authorization
string
Bearer token
Accept
string
application/json
Content-Type
string
application/json
Body
result_callback_url
string
Responses
200
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
Parameters
Path
id
string
The project id
Header
Authorization
string
Bearer token
Accept
string
application/json
Content-Type
string
application/json
Body
state_notification_email
string
state_notification_email: if the streams' states change, we will send a notification to the email you set.
state_notification_email_frequency
string
state_notification_email_frequency: 0:High 1:Low 2:None
state_notification_url
string
state_notification_url: if the streams' states change, we will post a request to this url you set.
Responses
200
Last modified 2mo ago