5 APIs – The piping between our components
This chapter covers
- Introduction to the FastAPI Framework
- Documenting our APIs using the OpenAPI Standard
- Testing our APIs using Postman and Locust
- API Management with WSO2
An Application Program Interface (API) is simply a way to interact with a software component. Generally, when we speak about APIs we are talking about the REST (Representational State Transfer) API standard. However, there are other standards such as GraphQL and the older SOAP (Simple Object Access Protocol).
The APIs act as a contract which both parties agree to abide by. For the consumer of the API, we agree to abide by any terms of use and licensing agreements and to follow any documentation and standards that have been established by the provider. In turn, the provider of an API provides a stable and scalable endpoint for us to access. Subscriptions to APIs will also provide tools to make costs/usage transparent as well as a Service Level Agreement (SLA).
5.1 API Driven Design
With the adoption of distributed computing, many developers and architects have taken an interest in an API Driven Design approach. Often, we can expect our software to be deployed to the cloud or into a containerized environment. In these instances, we want to make sure we have given thought to the API. As with most design objectives we want to keep some of the following things in mind.