When we want to create a new Custom API, we have to define the each of the endpoints and, if we want to consume them from Oracle MAX, we have to define the schemas and then add some mock data. Since version 16.4.1 (v3.0), there is a new feature, Express API, where we can create the resources and the schemas easily and declaratively.
I have to say that we can still create the APIs in the old way. But if we want to use Express API, we just have to select that option when creating an API.
The creation popup is the same as in previous versions.
But the API page is different. We no longer see endpoints, schema, security, types and traits menus, and instead of those we have resources menu option.
After creating a resource, we can see 4 tabs.
In the first one we can change the configuration of the resource and we can also define child and parent relationships between resources.
The next tab is fields. This is the way we start defining the schema of the API.
Using this feature will result in the automatic generation of the schemas.
Another tab is Methods. By default there are 5 methods created for CRUD operations, although we can create custom methods.
The last tab is to provide sample data. Before the Express API we had to manually build the json and now we can insert as many rows as we want using this form.
Now that we have finished to define our API, if we test it we can see the that the data is returned by the API, and we are ready to implement the API and create our MAX application.