Every API can have multiple endpoints. They can be used to structure different parts of the API or to serve multiple API versions at once (i.e. a v1 and a v2 endpoint). An Endpoint consists of interfaces and resources.
Interfaces
If you add an interface to an endpoint all of its public methods will be able to called from outside.
Resources
RESTful resources require a repository and a resource class. The resource class is used to decouple the API from the domain model. This makes it possible to rename fields, return more or less fields or to create multiple specialized resources from the same model.
Add Comment