Company
Date Published
Author
Albert Fang
Word count
1344
Language
English
Hacker News points
None

Summary

### An API is all about sharing information. The best design practices are those that make it simple for users to access data while making it difficult to misuse the framework. Developers should be able to make sense of the structure without much effort. A Logical Information Structure is necessary, as a REST API must have a logical structure to be useful. Collective resources hold more than one item and should be labeled with a plural noun. Individual models are children of collective resources and use a singular noun in their resource name. Communication is important, providing clear user feedback for successful interactions and standard error messages for problems. Large APIs require filtering or sorting information to retrieve individual entries. Multiple versions of the API can run in parallel to allow time for developers to update their applications. REST API best practices prevent cyberattacks and allow appropriate access for those who need it, using encryption, tokenization, and authorization services. Permission levels are granted to users with different levels of access, and request rate limits prevent DDoS attacks. An API gateway can be used to maintain security and performance if necessary.