Links

Base Projects

post
https://api-v2.acrcloud.com
/api/base-projects
Create a project
Curl
Python
PHP
Nodejs
curl --location --request POST 'https://api-v2.acrcloud.com/api/base-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
import requests
url = "https://api-v2.acrcloud.com/api/base-projects"
payload={
"name":"test",
"region":"eu-west-1",
"buckets":[8881,8883],
"type":"AVR",
"audio_type":"linein",
"external_ids":["spotify", "isr\", "deezer"]
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/base-projects',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"name":"test","region":"eu-west-1","buckets":[8881,8883],"type":"AVR","audio_type":"linein","external_ids":["spotify","isrc","deezer"]});
var config = {
method: 'post',
url: 'https://api-v2.acrcloud.com/api/base-projects',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
get
https://api-v2.acrcloud.com
/api/base-projects
List projects
Curl
curl --location --request GET 'https://api-v2.acrcloud.com/api/base-projects?type=AVR' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
get
https://api-v2.acrcloud.com
/api/base-projects/:id
Get a project
Curl
curl --location --request GET 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
put
https://api-v2.acrcloud.com
/api/base-projects/:id
Update a project
Curl
curl --location --request PUT 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
delete
https://api-v2.acrcloud.com
/api/base-projects/:id
Delete a project
get
https://us-api-v2.acrcloud.com/api/
base-projects/:id/buckets-status
Get the status of the project's buckets
Curl
Python
curl --location --request GET 'https://us-api-v2.acrcloud.com/api/base-projects/:your_project_id/buckets-status' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_token'
import requests
url = "https://us-api-v2.acrcloud.com/api/base-projects/:project_id/buckets-status"
payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer your_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
get
https://api-v2.acrcloud.com
/api/base-projects/:id/day-stat
Get the statistics of the project
Curl
curl --request GET 'https://api-v2.acrcloud.com/api/base-projects/:id/day-stat?start=2021-04-09&end=2021-04-23'
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_token'