ACRCloud
Search…
Buckets
post
https://api-v2.acrcloud.com
/api/buckets
Create a bucket
Curl
Python
PHP
Nodejs
1
curl --location --request POST 'https://api-v2.acrcloud.com/api/buckets' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token' \
4
--header 'Content-Type: application/json' \
5
--data-raw '{
6
"name":"avbucket",
7
"type":"File",
8
"labels":["Music", "Video"],
9
"net_type":1,
10
"region":"ap-southeast-1"
11
}'
Copied!
1
import requests
2
3
url = "https://api-v2.acrcloud.com/api/buckets"
4
5
data={"name":"avbucket",
6
"type":"File",
7
"labels":["Music", "Video"],
8
"net_type":1,
9
"region":"ap-southeast-1"
10
}
11
headers = {
12
'Accept': 'application/json',
13
'Authorization': 'Bearer token'
14
}
15
16
response = requests.post(url, headers=headers, json=data)
17
18
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/buckets',
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 => array('name' => 'testbucket','region' => 'ap-southeast-1','type' => 'File'),
15
CURLOPT_HTTPHEADER => array(
16
'Accept: application/json',
17
'Authorization: Bearer token'
18
),
19
));
20
21
$response = curl_exec($curl);
22
23
curl_close($curl);
24
echo $response;
Copied!
1
var axios = require('axios');
2
var data = JSON.stringify({"name":"avbucket","type":"File","labels":["Music","Video"],"net_type":1,"region":"ap-southeast-1"});
3
4
var config = {
5
method: 'post',
6
url: 'https://api-v2.acrcloud.com/api/buckets',
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/buckets
List Buckets
Curl
Python
PHP
Nodejs
1
equest GET 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token'
Copied!
1
import requests
2
3
url = "https://api-v2.acrcloud.com/api/buckets?region=eu-west-1"
4
5
payload={}
6
headers = {
7
'Accept': 'application/json',
8
'Authorization': 'Bearer token'
9
}
10
11
response = requests.request("GET", url, headers=headers, data=payload)
12
13
print(response.text)
Copied!
1
2
$curl = curl_init();
3
4
curl_setopt_array($curl, array(
5
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1',
6
CURLOPT_RETURNTRANSFER => true,
7
CURLOPT_ENCODING => '',
8
CURLOPT_MAXREDIRS => 10,
9
CURLOPT_TIMEOUT => 0,
10
CURLOPT_FOLLOWLOCATION => true,
11
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
12
CURLOPT_CUSTOMREQUEST => 'GET',
13
CURLOPT_HTTPHEADER => array(
14
'Accept: application/json',
15
'Authorization: Bearer token'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
echo $response;
Copied!
1
var data = qs.stringify({
2
3
});
4
var config = {
5
method: 'get',
6
url: 'https://api-v2.acrcloud.com/api/buckets?region=eu-west-1',
7
headers: {
8
'Accept': 'application/json',
9
'Authorization': 'Bearer token'
10
},
11
data : data
12
};
13
14
axios(config)
15
.then(function (response) {
16
console.log(JSON.stringify(response.data));
17
})
18
.catch(function (error) {
19
console.log(error);
20
});
Copied!
get
https://api-v2.acrcloud.com
/api/buckets/:id
Get a bucket
Curl
Python
PHP
Nodejs
1
curl --request GET 'https://api-v2.acrcloud.com/api/buckets/8881' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer your_access_token'
Copied!
1
import requests
2
3
url = "https://api-v2.acrcloud.com/api/buckets/966"
4
5
payload={}
6
headers = {
7
'Accept': 'application/json',
8
'Authorization': 'Bearer your_access_token'
9
}
10
11
response = requests.request("GET", url, headers=headers, data=payload)
12
13
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/buckets/966',
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 => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Accept: application/json',
16
'Authorization: Bearer your_access_token'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
24
var axios = require('axios');
25
26
var config = {
27
method: 'get',
28
url: 'https://api-v2.acrcloud.com/api/buckets/966',
29
headers: {
30
'Accept': 'application/json',
31
'Authorization': 'Bearer your_access_token'
32
}
33
};
34
35
axios(config)
36
.then(function (response) {
37
console.log(JSON.stringify(response.data));
38
})
39
.catch(function (error) {
40
console.log(error);
41
});
42
Copied!
1
var axios = require('axios');
2
3
var config = {
4
method: 'get',
5
url: 'https://api-v2.acrcloud.com/api/buckets/966',
6
headers: {
7
'Accept': 'application/json',
8
'Authorization': 'Bearer your_access_token'
9
}
10
};
11
12
axios(config)
13
.then(function (response) {
14
console.log(JSON.stringify(response.data));
15
})
16
.catch(function (error) {
17
console.log(error);
18
});
19
Copied!
put
https://api-v2.acrcloud.com
/api/buckets/:id
Update a bucket
Curl
1
curl --location --request PUT 'https://api-v2.acrcloud.com/api/buckets/8881' \
2
--header 'Accept: application/json' \
3
--header 'Authorization: Bearer token' \
4
--header 'Content-Type: application/json' \
5
--data-raw '{"name":"bucket-music"}'
Copied!
delete
https://api-v2.acrcloud.com
/api/buckets/:id
Delete the bucket
Last modified 27d ago