How to connect Metabase to a data source via an API instead of a direct DB connection?

Hi everyone,

I am facing a specific architectural constraint in my corporate environment and I’m looking for guidance or potential workarounds.

The Problem:

I have access to a Metabase instance hosted on a corporate server. However, due to strict security policies, direct database connections (JDBC/ODBC) are prohibited. Our infrastructure team insists that the data must be accessed exclusively through a REST API layer, rather than a direct connection to the database files or the database server itself.

The Challenge:

Metabase is designed to connect to databases using specific drivers (PostgreSQL, MySQL, etc.) which require direct network access to the database port. Since I cannot provide a direct database host/path and must interact with an API, I am stuck.

My Questions:

  1. Is there a way to implement a Custom JDBC Driver or a middleware that can wrap a REST API into a format that Metabase can consume as a standard database?

  2. Has anyone used tools like Trino (formerly Presto) or similar data virtualization engines to bridge an API-based data source to Metabase?

  3. Are there any existing community drivers or plugins designed to fetch data from JSON/REST endpoints and present them as relational tables within Metabase?

Any insights, architectural patterns, or similar experiences would be greatly appreciated!

Thanks in advance.

Sounds like your infrastructure team has no understanding of databases! I use REST APIs a lot to retrieve data from cloud applications. I then stuff it into a 'proper' database that can be queried.

The problem with using REST is that it's very verbose so you end up having to page the data then magically join multiple endpoints at the client side.

The only approach that works is if you can pass SQL or some other data language to the REST API but that nullifies their desired security model.

They need to either give you some limited views of the data or a 2nd copy with the secure stuff hidden or removed.

What’s the schema of the api?

@AndrewMBaines this pattern is somehow “normal” on data meshes

I’ve used Progress JDBC to front a REST API (not with Metabase) but it’s doing a lot of caching.

I’m sure it’s possible to wrap that for Metabase but if you own the database, it’s a nuisance.

Metabase does not support REST APIs, but Trino is widely used as a proxy/bridge layer.