ACRCloud
Search…
Base Projects
post
https://api-v2.acrcloud.com
/api/base-projects
Create a project
Curl
Python
PHP
Nodejs
1
curl --location --request POST 'https://api-v2.acrcloud.com/api/base-projects' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token' \
4
--header 'Content-Type: application/json' \
5
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
Copied!
1
import requests
2
3
url = "https://api-v2.acrcloud.com/api/base-projects"
4
5
payload={
6
"name":"test",
7
"region":"eu-west-1",
8
"buckets":[8881,8883],
9
"type":"AVR",
10
"audio_type":"linein",
11
"external_ids":["spotify", "isr\", "deezer"]
12
}
13
headers = {
14
'Accept': 'application/json',
15
'Authorization': 'Bearer token',
16
'Content-Type': 'application/json'
17
}
18
19
response = requests.post(url, headers=headers, json=payload)
20
21
print(response.text)
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/base-projects',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}',
15
CURLOPT_HTTPHEADER => array(
16
'Accept: application/json',
17
'Authorization: Bearer token',
18
'Content-Type: application/json'
19
),
20
));
21
22
$response = curl_exec($curl);
23
24
curl_close($curl);
25
echo $response;
Copied!
1
var axios = require('axios');
2
var data = JSON.stringify({"name":"test","region":"eu-west-1","buckets":[8881,8883],"type":"AVR","audio_type":"linein","external_ids":["spotify","isrc","deezer"]});
3
4
var config = {
5
method: 'post',
6
url: 'https://api-v2.acrcloud.com/api/base-projects',
7
headers: {
8
'Accept': 'application/json',
9
'Authorization': 'Bearer token',
10
'Content-Type': 'application/json'
11
},
12
data : data
13
};
14
15
axios(config)
16
.then(function (response) {
17
console.log(JSON.stringify(response.data));
18
})
19
.catch(function (error) {
20
console.log(error);
21
});
22
Copied!
get
https://api-v2.acrcloud.com
/api/base-projects
List projects
Curl
1
curl --location --request GET 'https://api-v2.acrcloud.com/api/base-projects?type=AVR' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token'
Copied!
get
https://api-v2.acrcloud.com
/api/base-projects/:id
Get a project
Curl
1
curl --location --request GET 'http://127.0.0.1:8080/api/base-projects/15' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token'
Copied!
put
https://api-v2.acrcloud.com
/api/base-projects/:id
Update a project
Curl
1
curl --location --request PUT 'http://127.0.0.1:8080/api/base-projects/15' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token' \
4
--header 'Content-Type: application/json' \
5
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
Copied!
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
1
curl --location --request GET 'https://us-api-v2.acrcloud.com/api/base-projects/:your_project_id/buckets-status' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer your_token'
Copied!
1
import requests
2
3
url = "https://us-api-v2.acrcloud.com/api/base-projects/:project_id/buckets-status"
4
5
payload={}
6
headers = {
7
'Accept': 'application/json',
8
'Authorization': 'Bearer your_token'
9
}
10
11
response = requests.request("GET", url, headers=headers, data=payload)
12
13
print(response.text)
Copied!
get
https://api-v2.acrcloud.com
/api/base-projects/:id/day-stat
Get the statistics of the project
Curl
1
curl --request GET 'https://api-v2.acrcloud.com/api/base-projects/:id/day-stat?start=2021-04-09&end=2021-04-23'
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer your_token'
Copied!
Last modified 27d ago