Rest Intro
Depending on the type of projects you are working on, you might need to create a new REST API route or add a new API field to the existing route.
We have prepared four interfaces and two abstract classes for you.
In general, you will use only what you need from the provided options.
CallableFieldInterface.php
The interface used in Rest API Field for providing callback method.
CallableRouteInterface.php
The interface used in Rest API Route for providing callback method.
RouteSecurityInterface.php
The interface used in Rest API Route for providing authentication methods.
RouteInterface.php
The interface used in Rest API Route for providing general options for your route like variables for READABLE
, CREATABLE
, etc...
AbstractField.php
Abstract class used in Rest API Field for updating existing fields or providing a new field to the existing Rest API.
Please check the implementation details in this example.
AbstractRoute.php
Abstract class used in Rest API Route for adding a new Rest API route.
Please check the implementation details in this example.