While creating URI for web services, what are the best practices that needs to be followed?
While creating URI for web services, what are the best practices that needs to be followed?
Answer
Below is the list of best practices that need to be considered with designing URI for web services:
While defining resources, use plural nouns. Example: To identify user resource, use the name “users” for that resource.
While using the long name for resources, use underscore or hyphen. Avoid using spaces between words. For example, to define authorized users resource, the name can be “authorized_users” or “authorized-users”.
The URI is case-insensitive, but as part of best practice, it is recommended to use lower case only.
While developing URI, the backward compatibility must be maintained once it gets published. When the URI is updated, the older URI must be redirected to the new one using the HTTP status code 300.
Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website.
If you are using this website then its your own responsibility to understand the content of the website