Categories
Technical

What is the best practice for naming a REST endpoint ?

Lowercase letters and dashes

By convention, resource names should use exclusively lowercase letters. Similarly, dashes (-) are conventionally used in place of underscores (_).

Example: /users/{id}/pending-orders instead of /users/{id}/Pending_Orders

Source of information

Using a hyphen in your URLs is recommended by Google, because it makes your website easy to read for humans. As an end result, this means that your site will place better on search engines. Are you looking to learn more about how to improve the SEO of your blog?

Leave a Reply