The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

What makes a good REST API?

apitally.io
submitted
a year ago
byjosephtoprogramming

Summary

Frameworks like FastAPI, which provide an intuitive interface and are well documented, make it really easy. What does it take to maintain a robust REST API that other developers love using, that always works as expected and scales well? This article offers an opinionated overview of REST API best practices.

Rate limiting can be implemented at different levels of your stack, including the network level, your application code, or a combination of these. A good API performs longer running tasks in the background using a task queue and worker system. This avoids keeping client connections open for extended periods.

10

6 Comments

7
throwschen
a year ago
The weirdest thing I've ever run into with APIs is when errors aren't using the right HTTP and just using 200 with an error message. Dive me nuts and couldn't convince the person calling the shots that it was just plain wrong.
4
josephOP
a year ago
That just sounds like a pain in the ass to try and work against. So you'll never know if something errors unless you are constantly checking for it...
2
kaiserseahorse
a year ago
Yikes! That sounds like a miserable team to have worked on
1
throwschen
a year ago
I stayed longer than I ever should have but there were some positives to it
4
boredgamer
a year ago*
Really good set of best practices! Pretty much have these all as a check list when working on something new
2
josephOP
a year ago
It wasn't this exact article, but I've seen this set of recommendations before and it always makes for a really nice API to work with