10 REST API BEST PRACTICES

<h1><strong>1. Use descriptive and meaningful resource names-</strong></h1> <blockquote> <p>Instead of&nbsp;<strong>generic&nbsp;</strong>or&nbsp;<strong>ambiguous&nbsp;</strong>names, choose resource names that accurately represent the entities they represent.</p> </blockquote> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:515/1*_WZ-AIdCzBLLvJsBFSJYjA.png" style="height:456px; width:572px" /></p> <h1>2. Use HTTP methods correctly-</h1> <blockquote> <p>Use the appropriate&nbsp;<strong>HTTP&nbsp;</strong>methods (<strong>GET, POST, PUT, DELETE, PATCH, etc.</strong>) for different operations.</p> </blockquote> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:630/1*R0yK8nxs-jOTxiduzIbDXw.png" style="height:295px; width:700px" /></p> <h1>3. Version your APIs-</h1> <p><a href="https://medium.com/javarevisited/10-rest-api-best-practices-cd12e3904d00">Website</a></p>
Tags: API HTTP