DEV Community

Cover image for What is the most important rule when designing an API?

Posted on • Updated on

What is the most important rule when designing an API?

When designing an API for your Application Frontend, what is your rule of thumb?

Top comments (8)

ecyrbe profile image

These are some rules i apply that may not suit everyone:

  • share Ideas with your team
  • make sure you design user faced API
  • make distinct APIs for product admins and standard users
  • always design with security in mind
  • design it with separation concern
  • list your expected errors
  • do not handle unwanted use cases because 'maybe it could be used'
  • do not add complexity
  • make it reviewed by another team
kolja profile image

Make it save for ways you dont think about in the first way.

dougatgrafbase profile image
Doug Schwartz

Don't make me think.

syeo66 profile image
Red Ochsenbein (he/him) • Edited

Keep it consistent. (Used patterns and naming)
Don't make the frontend do the data processing.

mt3o_23 profile image
Teodor Kulej

Do one task, and do it right, don't overthink it.

If you want a rule that's less verbal and more technical, refer to SOLID principles.

decker67 profile image

Make it functional not technical, because the underlying technic can change more often than the desired function.

josunlp profile image
Jonas Pfalzgraf

Use the Open API standard with Swagger to simplify documentation and allow developers and users to work with it in a meaningful way.

cecon profile image
Gabriel Cecon Carlsen

Modularity. Each part has its own resposaility (easy to maintain)