Link to Open Table/Question View

We have a custom web app that creates Metabase tables dynamically. We would like to put a link to the created tables in our web app so that the user can click the link to open a new browser tab to the Metabase app page with the table view. By default, the Metabase web app creates a link to each table in the format http://host:port/question#hashorkey. Is there any way to retrieve either the hash/key or the full URL to the table/question using the api so that we can include the link in our web app? Is this the query hash in the Metabase query table?

Hi @metabasedev01
Two things.

The hash (known internally as queryhash or query hash) is just a base64 encoded JSON blob, which you can decode to understand the construction.

But there's also a little hack: /question#?db=123&table=789, where 123 is the database ID and 789 is the table ID.

1 Like

Great! So by hack does that mean unsupported? Or at least not guaranteed to be supported in the future? As far as the Base64 hash goes, is that something that we can then create on our end with know data elements, for example database ID, table ID, etc?

@metabasedev01 No, it will continue to be supported (likely "forever"), since it's actually used a few places in the GUI (do a search for a table, then you'll notice the link is that ID-style).
But using the base64 would give you a lot more options. And yes, any programming language supports encoding and decoding of base64. Just copy the hash, when you have created a question the way you want it and decode it, so you can understand it and modify it the way you want, then encode and use it.

Thanks again.