DEV Community

Discussion on: Should RESTful API URL be clean (/api/:param)?

Collapse
 
stereoplegic profile image
Mike Bybee • Edited

I'd say it's a bit of a reach to call it a security risk, especially in your example of articles. Users are a bit more sensitive, but as the Quora answers indicate: It really depends on the use case. Frontend routing libraries often invite or recommend similar patterns. It's not just about SEO, but for simplicity of structure. A well-architected REST API has an endpoint structure that is easy to reason about, just like a good frontend page/route structure.

Security certainly shouldn't be taken lightly, but it's important to remember that the "A" in the "CIA" of security is "Availability." That applies to DX as well as UX, and you shouldn't be so paranoid about security that you make life impossible for users or devs (and making it harder on the latter will inevitably make it harder on the former).