Published Nov 7, 2019

Episode 387: Abhinav Asthana on Designing and Testing APIs

Discover the art of designing and testing APIs with Postman CEO Abhinav Asthana as he delves into crafting minimal, user-centric APIs, synchronizing documentation with code, and navigating the nuances of GraphQL, REST, and JSON technologies.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Minimal APIs

    Creating minimal APIs is crucial for developers to meet user needs without overexposing internal data models. emphasizes starting with RESTful APIs, using HTTP verbs like GET and POST to define actions, and keeping the API's scope limited to essential resources 1. He advises separating API schemas from internal database schemas to maintain flexibility and clarity, suggesting tools like JSON Schema and OpenAPI for this purpose 1. notes, "Schemas help you get consensus among large number of actors who are building the API fairly quickly," which is vital for both small and large teams 2.

       

    Design Principles

    Effective API design requires a focus on delivering value and enhancing user experience. recommends testing APIs with diverse users to ensure they meet various use cases without modification 3. He highlights the importance of using pre-built language components for API consumption before developing SDKs, as this simplifies integration and enhances developer experience 4. According to Asthana, "If your API's job is to do payments or to store customer data, are all the variations that these clients are sending you accommodated in your API design?" This question underscores the need for comprehensive design practices 3.

       

    Testing APIs

    Testing is integral to ensuring API functionality and reliability. discusses using Postman for both functional and integration testing, allowing developers to simulate various scenarios and edge cases 5. He advises leveraging existing authentication schemes like OAuth 2.0 to streamline security processes, while API keys can simplify initial access 6. Asthana stresses the importance of external testing, stating, "Test with people who are outside your team first and get their perspective before settling on an API design," to avoid internal biases and ensure broader usability 5.

Related Episodes