Skip to main content

Example APIs

Throughout this tutorial, consider an example of a car dealership which has created a custom back-end CarInfoStore API to record information about what cars are on the lot, their prices, whether they have been sold or not, and so on. Table 1 shows a group of sample APIs.

Table 1 - Sample APIs
API EndpointMethodDescription
/carsGETRetrieve a list of all cars in the database.
/carsPOSTAdd a new car to the database.
/cars/{car id}GETGet information about a specific car.
/cars/{car id}PUTModify information about a specific car.
/cars/{car id}DELETERemove a specific car from the database.
/cars/{car id}/statusGETRetrieve the specific car's status.
/cars/{car id}/statusPUTModify the specific car's status.

Consider the following example:

You want to add authorization to this existing application using the Entitlements Systems to suit the business needs of the car dealership. For example, only managers can remove specific cars from the database, or modify them once they are recorded. Only sales staff can modify a car's status.