REST API Endpoint
The standardized REST API package utilizes one PHP class for each endpoint, and also maps the file / directory structure to the URI of each endpoint. You may create a new REST API endpoint by using the create api-endpoint CLI command, such as:
apex opus api-endpoint <FILENAME>
apex opus api-endpoint MyShop/Api/Products/Create
The above example would create a new file at
/src/MyShop/Api/Products/Create.php. The filename argumen is relative to the /src/ directory, and the .php extension at the end is optional. This will simply create a API endpoint class with an example method.
For full information on how to develop REST API endpoints, please visit the Guide: REST APIs Made Easy section of the documentation.