Get the list of cloud storage buckets in Google Cloud Platform (GCP)


Google's cloud storage service enables users to store objects in the cloud. An object can be a file of any format (ex. PDF, Word doc, images etc). The files are stored under storage buckets which are analogous to folders on the PCs.

IoT Cloud Tester  application provides an easy interface to get the list of cloud storage buckets in Google Cloud Platform.

To get the list of cloud storage buckets in GCP,

  • In the 'Cloud Storage' tab, click on 'List Buckets'.

A GET request is made to get the list of cloud storage buckets.

GET https://storage.googleapis.com/storage/v1/b?project=second-inquiry-315605 HTTP/1.1

Server Response to get the cloud storage buckets

{

"kind": "storage#buckets",

"items": [

{

"kind": "storage#bucket",

"selfLink": "https://www.googleapis.com/storage/v1/b/my-iot-bucket-5",

"id": "my-iot-bucket-5",

"name": "my-iot-bucket-5",

"projectNumber": "496777850585",

"metageneration": "1",

"location": "US",

"storageClass": "STANDARD",

"etag": "CAE=",

"timeCreated": "2021-07-09T13:34:20.476Z",

"updated": "2021-07-09T13:34:20.476Z",

"iamConfiguration": {

"bucketPolicyOnly": {

"enabled": false

},

"uniformBucketLevelAccess": {

"enabled": false

},

"publicAccessPrevention": "unspecified"

},

"locationType": "multi-region"

},

{

"kind": "storage#bucket",

"selfLink": "https://www.googleapis.com/storage/v1/b/my-iot-folder",

"id": "my-iot-folder",

"name": "my-iot-folder",

"projectNumber": "496777850585",

"metageneration": "1",

"location": "US",

"storageClass": "STANDARD",

"etag": "CAE=",

"timeCreated": "2021-08-05T13:17:13.709Z",

"updated": "2021-08-05T13:17:13.709Z",

"iamConfiguration": {

"bucketPolicyOnly": {

"enabled": false

},

"uniformBucketLevelAccess": {

"enabled": false

},

"publicAccessPrevention": "unspecified"

},

"locationType": "multi-region"

},

{

"kind": "storage#bucket",

"selfLink": "https://www.googleapis.com/storage/v1/b/my-iot-folder-2",

"id": "my-iot-folder-2",

"name": "my-iot-folder-2",

"projectNumber": "496777850585",

"metageneration": "1",

"location": "US",

"storageClass": "STANDARD",

"etag": "CAE=",

"timeCreated": "2021-08-05T13:56:11.999Z",

"updated": "2021-08-05T13:56:11.999Z",

"iamConfiguration": {

"bucketPolicyOnly": {

"enabled": false

},

"uniformBucketLevelAccess": {

"enabled": false

},

"publicAccessPrevention": "unspecified"

},

"locationType": "multi-region"

},

{

"kind": "storage#bucket",

"selfLink": "https://www.googleapis.com/storage/v1/b/my-iot-folder-3",

"id": "my-iot-folder-3",

"name": "my-iot-folder-3",

"projectNumber": "496777850585",

"metageneration": "1",

"location": "US",

"storageClass": "STANDARD",

"etag": "CAE=",

"timeCreated": "2021-08-05T14:06:47.298Z",

"updated": "2021-08-05T14:06:47.298Z",

"iamConfiguration": {

"bucketPolicyOnly": {

"enabled": false

},

"uniformBucketLevelAccess": {

"enabled": false

},

"publicAccessPrevention": "unspecified"

},

"locationType": "multi-region"

}

]

}