ACRCloud
Visit WebsiteConsole
  • Introduction
  • Get Started
  • Console Tutorials
    • Recognize Music
    • Recognize Custom Content
    • Broadcast Monitoring for Music
    • Broadcast Monitoring for Custom Content
    • Detect Live & Timeshift TV Channels
    • Recognize Custom Content Offline
    • Recognize Live Channels and Custom Content
    • Find Potential Detections in Unknown Content Filter
  • SDK REFERENCE
    • Mobile SDK
      • iOS
      • Android
      • Unity
    • Backend SDK
      • Python
      • PHP
      • Go
      • Java
      • C/C++
      • C#
    • Error Codes
  • API Reference
    • Identification API
    • Console API
      • Access Token
      • Buckets
        • Audio Files
        • Live Channels
        • Dedup Files
      • Base Projects
      • OfflineDBs
      • BM Projects
        • Custom Streams Projects
          • Streams
          • Streams Results
          • Streams State
          • Recordings
          • Analytics
          • User Reports
        • Broadcast Database Projects
          • Channels
          • Channels Results
          • Channels State
          • Recordings
          • Analytics
          • User Reports
      • File Scanning
        • FsFiles
      • UCF Projects
        • BM Streams
        • UCF Results
    • Metadata API
  • Tools
    • Audio File Fingerprinting Tool
    • Local Monitoring Tool
    • Live Channel Fingerprinting Tool
    • File Scan Tool
  • Metadata
    • Music
    • Music (Broadcast Monitoring with Broadcast Database)
    • Custom Files
    • Live Channels
    • Humming
  • FAQ
    • Definition of Terms
  • Service Usage
Powered by GitBook
On this page
  • Create a bucket
  • List Buckets
  • Get a bucket
  • Update a bucket
  • Delete the bucket
  1. API Reference
  2. Console API

Buckets

Create a bucket

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.

Headers

Name
Type
Description

Authorization

string

Bearer token

Request Body

Name
Type
Description

name

string

The bucket name

region

string

eu-west-1,us-west-2,ap-southeast-1

type

string

File,Live,LiveRec,LiveTimeshift

net_type

number

0,1,2

labels

array

The labels for the bucket. For examples: ["Music", "Comercial"]

metadata_template

string

Metadata template

{
    "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);
});

List Buckets

GET https://api-v2.acrcloud.com/api/buckets

Return a list of your buckets.

Query Parameters

Name
Type
Description

page

number

The page number

per_page

number

The results number per page. Default is 20

region

string

eu-west-1,us-west-2,ap-southeast-1

type

string

File,Live,LiveRec,LiveTimeshift

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "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 a bucket

GET https://api-v2.acrcloud.com/api/buckets/:id

Get the details of a bucket.

Path Parameters

Name
Type
Description

id

number

The bucket id

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "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);
});

Update a bucket

PUT https://api-v2.acrcloud.com/api/buckets/:id

Update the details of the bucket.

Path Parameters

Name
Type
Description

id

number

The bucket id

Headers

Name
Type
Description

Authorization

string

Bearer token

Request Body

Name
Type
Description

metadata_template

string

Update the metadata_template

labels

string

Update the labels

name

string

Update the bucket name

{
    "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 the bucket

DELETE https://api-v2.acrcloud.com/api/buckets/:id

Before you delete the bucket, you need to clean the bucket first.

Path Parameters

Name
Type
Description

id

number

The bucket id

Headers

Name
Type
Description

Authorization

string

Bearer token

Last updated 1 year ago