APIs
![](./talk-1-rest-intro/ac-api-intro.png)
An Application Programmer Interface is the published set of http endpoints and messages that a service can support. API design and implementation is a rich field of study - here we take a general overview.
Endpoints
![](./talk-2-endppints/endpoints.png)
Expose access to the Candidates model as a REST endpoint. This involved defining new routes and handlers, which respond simple JSON representations.
Testing Endpoints
![](./talk-3-testing-endpoints/testing-endpoints.png)
Tools like Postman and Insomnia usefully exercise endpoints. However, we can also exercise them problematically, which offers some significant advantages.
Lab-12 Apis
![](./book-api/img/main.jpeg)
Start the development of an API for the donation service, focusing initially on providing access to the Candidates model. Implement the API using simple REST principles.