"๐๐ก๐ข๐ฌ ๐๐๐ ๐ข๐ฌ ๐ ๐ง๐ข๐ ๐ก๐ญ๐ฆ๐๐ซ๐, ๐๐จ๐ฐ ๐๐ข๐ ๐ญ๐ก๐ข๐ฌ ๐๐ฏ๐๐ซ ๐ ๐๐ญ ๐ฌ๐ก๐ข๐ฉ๐ฉ๐๐?"
"๐๐ก๐ข๐ฌ ๐๐๐ ๐ข๐ฌ ๐ ๐ง๐ข๐ ๐ก๐ญ๐ฆ๐๐ซ๐, ๐๐จ๐ฐ ๐๐ข๐ ๐ญ๐ก๐ข๐ฌ ๐๐ฏ๐๐ซ ๐ ๐๐ญ ๐ฌ๐ก๐ข๐ฉ๐ฉ๐๐?" - Edyโs reaction while staring at the API documentation.
No one likes this kind of feedback. What should be done so that developers like Edy advocate for the API? Or, what does it take to ship and maintain a robust REST API, one that other developers will love using?
๐๐๐ซ๐ ๐๐ซ๐ ๐ฌ๐จ๐ฆ๐ ๐จ๐ ๐ญ๐ก๐ ๐ฉ๐จ๐ข๐ง๐ญ๐ฌ ๐๐ง๐ ๐๐๐ฌ๐ญ ๐ฉ๐ซ๐๐๐ญ๐ข๐๐๐ฌ ๐ญ๐ก๐๐ญ ๐ ๐ก๐๐ฏ๐ ๐ ๐๐ญ๐ก๐๐ซ๐๐ ๐๐ซ๐จ๐ฆ ๐ญ๐ก๐ ๐๐จ๐ฆ๐ฆ๐ฎ๐ง๐ข๐ญ๐ฒ:
1. ๐ฆ๐๐ฟ๐๐ฐ๐๐๐ฟ๐ถ๐ป๐ด ๐ฎ๐ป๐ฑ ๐ป๐ฎ๐บ๐ถ๐ป๐ด ๐๐ฃ๐ ๐ฒ๐ป๐ฑ๐ฝ๐ผ๐ถ๐ป๐๐: A good API has a well thought out and logical design of endpoints. ๐
2. ๐๐ผ๐บ๐ฝ๐ฟ๐ฒ๐ต๐ฒ๐ป๐๐ถ๐๐ฒ ๐๐ผ๐ฐ๐๐บ๐ฒ๐ป๐๐ฎ๐๐ถ๐ผ๐ป: Bad documentation will throw developers away. A good API makes sure the documentation is clear and follows industry standards. Eg. OpenAPI Specifications.๐
3. ๐๐ป๐ฝ๐๐ ๐ฉ๐ฎ๐น๐ถ๐ฑ๐ฎ๐๐ถ๐ผ๐ง: A good API meticulously validates user input and provides detailed and structured error messages when an invalid input is received. โ
4. ๐๐๐ญ๐ ๐ฅ๐ข๐ฆ๐ข๐ญ๐ข๐ง๐ : A good API employs rate limiting to prevent overloading and ensure quality of service for all clients. โ
5. ๐๐ฌ๐ฒ๐ง๐๐ก๐ซ๐จ๐ง๐จ๐ฎ๐ฌ ๐ฉ๐ซ๐จ๐๐๐ฌ๐ฌ๐ข๐ง๐ : A good API performs longer running tasks in the background using a task queue and worker system and avoids keeping client connections open for extended periods.๐
6. ๐๐จ๐ง๐ข๐ญ๐จ๐ซ๐ข๐ง๐ ๐๐ง๐ ๐จ๐๐ฌ๐๐ซ๐ฏ๐๐๐ข๐ฅ๐ข๐ญ๐ฒ: Maintaining a robust API requires proactive monitoring, so you can take action immediately if there are problems - ideally before they impact consumers. ๐
๐๐๐ฒ ๐ก๐๐ญ๐๐ฌ ๐๐๐ ๐๐๐ ๐๐จ๐๐ฎ๐ฆ๐๐ง๐ญ๐๐ญ๐ข๐จ๐ง. What are YOUR red flags that can make an API frustrating to work with?