Best practices for designing APIs

Best practices for designing APIs

 1 min read


With the Internet of Things (IoT) increasing connectivity across the globe and people producing and using data like never before, it’s important to follow best practices for user-friendly, RESTful APIs.


As George Mao recently wrote on his Amazon blog, there are a few things to consider and a handful of tools that can make the process easier:


Be aware of your whole infrastructure

Structure/scaling. What is your API architecture comprised of? Decouple it wherever possible. Be sure to accommodate the processing limits and behavior of all elements to ensure that your API can scale when necessary. When possible, swap out services for those that are more readily scalable.

Speed. Understand what speed each element can handle, as well as how many requests it can support per second. Amazon CloudWatch can help you here.

Prioritize security


Amazon API Gateway includes three layers of security: a firewall, a resource policy, and a few options for AuthZ authentication. At every stage of building your API, make sure that you stay aware of security risks and provision resources properly in response.


Remember your user


Use the golden rule when creating APIs. What would you want someone else’s API to look like if you were using it? For ease of use and a higher likelihood of success, make sure your code is clearly structured, concise, and well-labeled. Be descriptive with metadata.


For more information on building APIs, check out ReadWrite.




AWS logo