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

NameTypeDescription

Authorization

string

Bearer token

Request Body

NameTypeDescription

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"
}'

List Buckets

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

Return a list of your buckets.

Query Parameters

NameTypeDescription

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

NameTypeDescription

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'

Get a bucket

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

Get the details of a bucket.

Path Parameters

NameTypeDescription

id

number

The bucket id

Headers

NameTypeDescription

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'

Update a bucket

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

Update the details of the bucket.

Path Parameters

NameTypeDescription

id

number

The bucket id

Headers

NameTypeDescription

Authorization

string

Bearer token

Request Body

NameTypeDescription

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

NameTypeDescription

id

number

The bucket id

Headers

NameTypeDescription

Authorization

string

Bearer token

Last updated