usha
Login
Back to Blog
August 27, 20262 min read125 views

Building REST APIs? Don't Make These Mistakes

Before REST, integrating systems often meant CORBA, DCOM, or SOAP β€” powerful but heavyweight and complex.

Then in 2000, Roy Fielding's PhD dissertation introduced REST: stop exposing remote procedures, start exposing resources.

25+ years later, REST is still everywhere.

Here are the basics many β€œREST APIs” still get wrong:

𝗨π—₯π—Ÿπ˜€

❌ /getOrder/482

❌ /deleteOrder/482

βœ… GET /orders/482

βœ… DELETE /orders/482

β†’ URLs represent resources. HTTP methods represent actions.

π—¦π—§π—”π—§π—˜π—Ÿπ—˜π—¦π—¦π—‘π—˜π—¦π—¦

❌ Server depends on remembering previous requests.

βœ… Each request contains the information needed to process it.

β†’ Makes horizontal scaling much easier.

𝗛𝗧𝗧𝗣 π—©π—˜π—₯𝗕𝗦

GET β†’ read Β· POST β†’ create Β· PUT β†’ replace Β· PATCH β†’ partial update Β· DELETE β†’ remove

❌ GET /orders/482/cancel

βœ… PATCH /orders/482

{ "status": "cancelled" }

β†’ GET should never change server state.

𝗦𝗧𝗔𝗧𝗨𝗦 π—–π—’π——π—˜π—¦

❌ 200 OK for everything.

βœ… 201 created Β· 204 success/no content Β· 404 not found Β· 409 conflict Β· 422 invalid data Β· 500 server error

β†’ Status codes are part of your API contract.

π—©π—˜π—₯π—¦π—œπ—’π—‘π—œπ—‘π—š

❌ Breaking clients with silent changes.

βœ… /api/v1/orders

β†’ Keep changes backward-compatible where possible; version breaking changes.

And REST isn't perfect. Over-fetching, under-fetching, and service-to-service performance are some reasons teams also use GraphQL or gRPC.

REST was never simply β€œJSON + HTTP.”

It's a discipline built around resources, statelessness, uniform interfaces, and predictable communication.

Get those principles right, and your APIs become easier to build, scale, and consume.

Chat on WhatsApp