2
votes

I have various buckets in google cloud storage which is being created from my backend. I want to import these buckets to firebase. In firebase there is a option to import the google cloud buckets to firebase, but I want to automate these tasks because any number of buckets can be created in my app and I cannot go to firebase always and import the buckets to it. how to do this?

1
I had always assumed that firebase storage and GCP cloud storage were the same animals ... meaning that an object in GCS was the same object in firebase storage. - Kolban
@Kolban The buckets are the same, but Firebase keeps its own list of buckets for the project. - Frank van Puffelen
What is the process you are mentioning to import the buckets from GCP to Firebase? I ask because I would simply move the bucket with an SDK as mentioned here - rsalinas
@rsalinas you can check this firebase.googleblog.com/2017/03/… link out to import manually. - vishal
For what I can see in the guide, the UI is only doing a move as if you did it with the SDK, so I would say that you can take this approach too and just move your buckets - rsalinas

1 Answers

0
votes

Yes there is REST API method.

POST https://firebasestorage.googleapis.com/v1beta/{bucket=projects/*/buckets/*}:addFirebase

Links a Google Cloud Storage bucket to a Firebase project.

source: https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets/addFirebase