Skip to main content

REST Intro

docs-source

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 an existing route.

We have prepared four interfaces and two abstract classes for you.

In general, you will only use what you need from the provided options.

CallableFieldInterface.php

The interface used in REST API Fields for providing a callback method.

CallableRouteInterface.php

The interface used in REST API Routes for providing a callback method.

RouteSecurityInterface.php

The interface used in REST API Routes for providing authentication methods.

RouteInterface.php

The interface used in REST API Routes for providing general options for your route, such as 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.