Metabase REST API Patterns
Daniel Higginbotham edited this page Jan 23, 2020
·
4 revisions
I'm hoping we can write down:
- Patterns for using the REST API with a client (e.g. the JS web app frontend), and code examples
- Patterns for handling REST API requests in the backend, and code examples
- Reasoning behind any patterns that aren't obvious
These all have a standard pattern, since the code that throws them is generated by the defendpoint
macro. I have to go look it up and post it here
We are in the process of standardizing all of these to come back with an :error_type
key (going forward); they also come back with:
Async responses return a 202
status and stream the body. The body should include a _status
JSON key so that the frontend can dispatch on non-OK responses. In particular, if an exception is thrown we want the frontend to display it.
- Backend
- Metabase Developer Reference
- Product Management
- QA and Testing
- Writing A Driver
- Driver Notices
- REST API Notices
- Writing style guide for documentation and blog posts (WIP)