DEV Community

Cover image for ๐“๐ก๐ข๐ฌ ๐€๐๐ˆ ๐ข๐ฌ ๐š ๐ง๐ข๐ ๐ก๐ญ๐ฆ๐š๐ซ๐ž, ๐‡๐จ๐ฐ ๐๐ข๐ ๐ญ๐ก๐ข๐ฌ ๐ž๐ฏ๐ž๐ซ ๐ ๐ž๐ญ ๐ฌ๐ก๐ข๐ฉ๐ฉ๐ž๐?
Sohail Pathan
Sohail Pathan

Posted on โ€ข Originally published at linkedin.com

1

๐“๐ก๐ข๐ฌ ๐€๐๐ˆ ๐ข๐ฌ ๐š ๐ง๐ข๐ ๐ก๐ญ๐ฆ๐š๐ซ๐ž, ๐‡๐จ๐ฐ ๐๐ข๐ ๐ญ๐ก๐ข๐ฌ ๐ž๐ฏ๐ž๐ซ ๐ ๐ž๐ญ ๐ฌ๐ก๐ข๐ฉ๐ฉ๐ž๐?

"๐“๐ก๐ข๐ฌ ๐€๐๐ˆ ๐ข๐ฌ ๐š ๐ง๐ข๐ ๐ก๐ญ๐ฆ๐š๐ซ๐ž, ๐‡๐จ๐ฐ ๐๐ข๐ ๐ญ๐ก๐ข๐ฌ ๐ž๐ฏ๐ž๐ซ ๐ ๐ž๐ญ ๐ฌ๐ก๐ข๐ฉ๐ฉ๐ž๐?" - 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. OpenAI 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?

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, โ€œnot bad.โ€

Fixing code doesnโ€™t have to be the worst part of your day. Learn how Sentry can help.

Learn more