Copy Collection for separate database

We have created Template collection with all

  • Dashboard
  • Questions
  • Pulses
  • Others

We have kept name of database as placeholder, so that runtime we can replace it with actual database name

I have implemented .NET code (Webclient) and connected to Metabase instance and got session ID for the same.

Now, i want to call API to create collection for given database by referring to Template ID and then rename reports in newly created collection.

I looked API, but not able to make it out which Endpoint i need to call to perform this requirement.

If it is /api/dashboard/:from-dashboard-id/copy, i am not sure what all parameters i need to pass here to get this working.

I can see something can be done in Python, does it means, it can't be done using API?
[https://github.com/metabase/metabase/issues/9083](http://deep copy a dashboard)
Does this will also do rename given question/pulse with new database name?

It will be great if somebody can help me out here.

Hi @manish.joisar
No, it's currently not possible to do through the API by itself.
The Serialization functionality in the Enterprise Edition is created to do this:
https://www.metabase.com/learn/data-diet/analytics/serialization.html

Thanks Flamber for quick reply.

When i say new database, i mean within same Metabase instance, we have developed product, so all customers will have same database structure.

So within same metabase instance, want to copy all resources from previous customer collection to a new collection created for new customer.

@manish.joisar Yes, that's what some uses Serialization for too. But there's several scripts, which can help you with that otherwise - have a look at Github, Deep Copy, Cloning Dashboards and Underlying Tables

1 Like