Buckets
Last updated
Last updated
POST
https://api-v2.acrcloud.com/api/buckets
Create an empty bucket, then you can upload audio files or add channels to this bucket to create your fingerprint database.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"data": {
"id": 8881,
"uid": 1,
"name": "bucket_music",
"type": "File",
"node": "127.0.0.1-871",
"state": 1,
"region": "ap-southeast-1",
"metadata_template": "{\"artist\":{\"default\":\"abc\"}, \"album\":{\n\"type\":\"select\", \"default\":\"334\", \"options\":[\"123\", \"334\"]}}",
"labels": [
"Music",
"Video"
],
"net_type": 1,
"created_at": "2019-03-01 15:31:25",
"updated_at": "2019-08-16 07:17:32",
"num": 10,
"size": "300000",
"access_permission": "private"
}
}
curl --location --request POST 'https://api-v2.acrcloud.com/api/buckets' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"avbucket",
"type":"File",
"labels":["Music", "Video"],
"net_type":1,
"region":"ap-southeast-1"
}'
import requests
url = "https://api-v2.acrcloud.com/api/buckets"
data={"name":"avbucket",
"type":"File",
"labels":["Music", "Video"],
"net_type":1,
"region":"ap-southeast-1"
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token'
}
response = requests.post(url, headers=headers, json=data)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/buckets',
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 => array('name' => 'testbucket','region' => 'ap-southeast-1','type' => 'File'),
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer token'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"name":"avbucket","type":"File","labels":["Music","Video"],"net_type":1,"region":"ap-southeast-1"});
var config = {
method: 'post',
url: 'https://api-v2.acrcloud.com/api/buckets',
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/buckets
Return a list of your buckets.
{
"data": [
{
"id": 14791,
"uid": 19,
"name": "test",
"type": "Live",
"state": 1,
"region": "eu-west-1",
"metadata_template": null,
"labels": [
"TV"
],
"net_type": 1,
"created_at": "2020-07-16 11:09:20",
"updated_at": "2020-07-16 11:09:20",
"num": 0,
"size": 0,
"access_permission": "private"
},
{
"id": 14556,
"uid": 19,
"name": "adsfasdf",
"type": "LiveTimeshift",
"state": 1,
"region": "eu-west-1",
"metadata_template": "",
"labels": [
""
],
"net_type": 1,
"created_at": "2020-06-24 11:07:00",
"updated_at": "2020-06-24 11:07:00",
"num": 0,
"size": 0,
"access_permission": "private"
},
{
"id": 12310,
"uid": 19,
"name": "eu_shared_bucket2",
"type": "LiveRec",
"state": 1,
"region": "eu-west-1",
"metadata_template": "",
"labels": [
"Radio"
],
"net_type": 1,
"created_at": "2019-10-30 07:54:56",
"updated_at": "2019-10-30 07:54:56",
"num": 0,
"size": 0,
"access_permission": "private"
},
{
"id": 12309,
"uid": 19,
"name": "eu_shared_bucket",
"type": "LiveRec",
"node": "",
"state": 1,
"region": "eu-west-1",
"metadata_template": "",
"labels": [
"Radio"
],
"net_type": 1,
"created_at": "2019-10-30 07:53:58",
"updated_at": "2019-10-30 07:53:58",
"num": 0,
"size": 0,
"access_permission": "private"
},
{
"id": 1159,
"uid": 19,
"name": "us_bucket",
"type": "File",
"state": 1,
"region": "global",
"metadata_template": "",
"labels": [
"Music"
],
"net_type": 0,
"created_at": "2016-05-11 06:49:55",
"updated_at": "2017-07-17 11:48:06",
"num": 7,
"size": "1487",
"access_permission": "private"
},
{
"id": 1116,
"uid": 19,
"name": "offline-bucket",
"type": "File",
"node": "10.12.12.236-850",
"state": 1,
"region": "eu-west-1",
"metadata_template": "",
"labels": [
"Music"
],
"net_type": 2,
"created_at": "2016-05-01 07:10:16",
"updated_at": "2018-01-05 16:41:15",
"num": 0,
"size": 0,
"access_permission": "private"
}
],
"links": {
"first": "https://api-v2.acrcloud.com/api/buckets?page=1",
"last": "https://api-v2.acrcloud.com/api/buckets?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api-v2.acrcloud.com/api/buckets",
"per_page": 20,
"to": 6,
"total": 6
}
}
equest GET 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
import requests
url = "https://api-v2.acrcloud.com/api/buckets?region=eu-west-1"
payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer token'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = qs.stringify({
});
var config = {
method: 'get',
url: 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer token'
},
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/buckets/:id
Get the details of a bucket.
{
"data": {
"id": 8881,
"uid": 1,
"name": "bucket_music",
"type": "File",
"node": "127.0.0.1-871",
"state": 1,
"region": "ap-southeast-1",
"metadata_template": "{\"artist\":{\"default\":\"abc\"}, \"album\":{\n\"type\":\"select\", \"default\":\"334\", \"options\":[\"123\", \"334\"]}}",
"labels": [
"Music",
"Video"
],
"net_type": 1,
"created_at": "2019-03-01 15:31:25",
"updated_at": "2019-08-16 07:17:32",
"num": 10,
"size": "300000",
"access_permission": "private"
}
}
curl --request GET 'https://api-v2.acrcloud.com/api/buckets/8881' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_access_token'
import requests
url = "https://api-v2.acrcloud.com/api/buckets/966"
payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer your_access_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/buckets/966',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer your_access_token'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api-v2.acrcloud.com/api/buckets/966',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer your_access_token'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api-v2.acrcloud.com/api/buckets/966',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer your_access_token'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
PUT
https://api-v2.acrcloud.com/api/buckets/:id
Update the details of the bucket.
{
"data": {
"id": 8881,
"uid": 1,
"name": "bucket_music",
"type": "File",
"node": "127.0.0.1-871",
"state": 1,
"region": "ap-southeast-1",
"metadata_template": "{\"artist\":{\"default\":\"abc\"}, \"album\":{\n\"type\":\"select\", \"default\":\"334\", \"options\":[\"123\", \"334\"]}}",
"labels": [
"Music",
"Video"
],
"net_type": 1,
"created_at": "2019-03-01 15:31:25",
"updated_at": "2019-08-16 07:17:32",
"num": 10,
"size": "300000",
"access_permission": "private"
}
}
curl --location --request PUT 'https://api-v2.acrcloud.com/api/buckets/8881' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"bucket-music"}'
DELETE
https://api-v2.acrcloud.com/api/buckets/:id
Before you delete the bucket, you need to clean the bucket first.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|