Fork this repo and clone it to your machine to get started!
- Linus Lei
- Way Zheng
Answer for Question 1:
RESTful APIs are scalable because they use a stateless architecture which means that no client context is stored on the server between requests. This means that any incoming request from any client can be handled by any server, making it easier to distribute requests and scale out the system horizontally. Additionally, RESTful APIs use standard HTTP methods, making them easier to cache and leading to improved performance at scale.
reference from https://aws.amazon.com/what-is/restful-api/. Systems that implement REST APIs can scale efficiently because REST optimizes client-server interactions. Statelessness removes server load because the server does not have to retain past client request information. Well-managed caching partially or completely eliminates some client-server interactions. All these features support scalability without causing communication bottlenecks that reduce performance.
Answer for Question 2:
The definition of "resources" in the context of RESTful APIs refers to the distinct pieces of information or data that can be accessed or manipulated through the API. The specific resources provided by a mail server would depend on the specific implementation and functionality of that mail server.
reference from https://aws.amazon.com/what-is/restful-api/. Resources are the information that different applications provide to their clients. Resources can be images, videos, text, numbers, or any type of data. The machine that gives the resource to the client is also called the server. Organizations use APIs to share resources and provide web services while maintaining security, control, and authentication. In addition, APIs help them to determine which clients get access to specific internal resources.
Answer for Question 3:
One common REST method that is not commonly used in email servers is the PATCH method.
To extend our email server to use the PATCH method, the server would need to be updated to accept PATCH requests and to handle them appropriately.
Anser for Question 4:
API keys are used for many RESTful APIs as a means of authentication and authorization. API keys serve the purpose of allowing access to a specific API endpoint and controlling the usage of that endpoint by different clients.
An API key is a string of characters that is generated by the API provider and provided to the API client. When making API requests, the API client includes the API key in the request headers or in the request URL. The API server then uses the API key to determine the identity of the client and to verify that the client has permission to access the API endpoint.
references: https://restfulapi.net/security-essentials-api-keys/ https://www.mulesoft.com/resources/api/what-are-api-keys-used-for https://nordicapis.com/what-are-api-keys-and-how-do-they-work/