The JSON API lets you render Data from an external source, it can be a Local JSON file or a Remote API/REST.
Many providers are offering an access to data with an API, it means that you can render data coming from your own existing Database (MySQL, Oracle…) or from other solutions (Airtable, etc…).
Architecture of the Json API
If you want to learn about how to create an API Rest from your existing Database, please read this documentation: Implementing your API
You will find below different possible Json API implementation scenarios:
Case 1. By using a Local JSON file source, it is possible to implement a Master/Detail App with search functionalities, without using a Database.
You can use a JSON Repeater linked to a page with a JSON Displayer for displaying detailed information.
You can even link a JSON Search Box to the Repeater for adding search functionnalities.
Case 2. By using the API provided by some third party solutions, you can also implement a master/detail App for loading your data into your APP.
For instance, Airtable provides an API usable in Thorium Builder.
See the screenshots below, created from one of the Airtable DB examples:
Case 3. If you want to use data coming from an existing database, then you can use all the possibilities of the Json API Plugin, Master-detail, search & filters and even entering data.
If you already have an API on your database, then you can use it for creating your PWA, else you can create API in a very simple way, see the documentation Implementing your API
In this Chapter, we will describe what is happening and how the data are handled when using the JSON API.
Master Detail Implementation. You can implement a JSON Repeater that will call an API for displaying a set of data to the user. When the data are loaded, they are all added to memory, and the Displayer will display only the data, depending on the Repeater settings.
If you implement a detail page with a Json displayer , the when the user will select a line on the Repeater, it will load the page and display all the information (depending on the displayer setup).
When the Page with the JSON Displayer is loaded, you have 2 options, you can use the data already in Memory (the data from the API used with the JSON Repeater) , or call another API that will load additional Data by passing an ID (a Primary Key)
Here is a schema of the different process steps:
Single Record Load Using a JSON Displayer combined to a Repeater lets you implement a Master/Detail application, but you can also use the JSON Displayer for loading a single Record.
Of course in that case, the API used with the Displayer is Supposed to load a single Record.
The Json API Repeaters & Displayers are using the fetch API ( https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API )
If you need to manipulate the options & headers sent to the server, please read this tutorial: https://www.thoriumbuilder.com/tutorial_detail.html?id=162529280