in Technology by

What are the best practices to create a standard URI for a web service?

1 Answer

0 votes
by

Following are important points to be considered while designing a URI −

  • Use Plural Noun − Use plural noun to define resources. For example, we've used users to identify users as a resource.

  • Avoid using spaces − Use underscore(_) or hyphen(-) when using a long resource name, for example, use authorized_users instead of authorized%20users.

  • Use lowercase letters − Although URI is case-insensitive, it is good practice to keep url in lower case letters only.

  • Maintain Backward Compatibility − As Web Service is a public service, a URI once made public should always be available. In case, URI gets updated, redirect the older URI to new URI using HTTP Status code, 300.

  • Use HTTP Verb − Always use HTTP Verb like GET, PUT, and DELETE to do the operations on the resource. It is not good to use operations names in URI.

Related questions

0 votes
    What are the best practices to be followed while designing a secure RESTful web service?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What Are The Best Practices For Amazon Ec2 ?...
asked Mar 12, 2021 in Technology by JackTerrance
0 votes
    What Are The Security Best Practices For Amazon Ec2 ?...
asked Mar 12, 2021 in Technology by JackTerrance
0 votes
    What are the best practices for caching in RESTful?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Mention a few design and development best practices for Informatica....
asked Mar 27, 2021 in Technology by JackTerrance
0 votes
    I've worked a lot with Pentaho PDI so some obvious things jump out at me. I'll call Connection ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    Some 4 years back, I followed this MSDN article for DateTime usage best practices for building a .Net ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Some 4 years back, I followed this MSDN article for DateTime usage best practices for building a .Net ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    What are some of the best practices in test automation?...
asked Jul 10, 2021 in Technology by JackTerrance
0 votes
    What are some best practices you should follow while using ServiceNow?...
asked May 25, 2021 in Technology by JackTerrance
0 votes
    What are the best practices to design a resource representation?...
asked Nov 7, 2020 in Technology by JackTerrance
+1 vote
    Enlist some best practices that are followed to make API testing successful?...
asked Oct 15, 2020 in Technology by JackTerrance
0 votes
    Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    This is a bit of an odd question, but it has been bothering me for a few months now. I have ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Is there some reasonably cross platform way to create a thumbnail image given a URL? I know there are ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
...