The most common way to interact with datasets is via the REST API.
./metriql serve command creates an HTTP server that takes dbt Core artifact called
If you use the
--api-auth-secret-* arguments or
METRIQL_API_AUTH_SECRET_* environment variables, the JWT based authorization becomes active automatically. All the requests need to have
Authorization: Bearer [TOKEN] header parameter. You can generate the token either in your backend application or use an authorization provider such as Auth0 or Amazon Cognito.
The JWT body is parsed and if you have user attributes attached to the
user_metadata, you can reference them as
user.attributeName in Jinja context.