Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Brenda Jin, Saurabh Sahni, Amir Shevat

With this practical guide, developers, architects, and tech leads will learn how to navigate complex decisions for designing, scaling, marketing, and evolving interoperable APIs. Authors Brenda Jin, Saurabh Sahni, and Amir Shevat explain API design theory and provide hands-on exercises for building your web API and managing its operation in production. You'll also learn how to build and maintain a following of app developers.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical field guide to designing, securing, launching, and evolving web APIs that developers actually want to use—written for developers, architects, and tech leads who own an API's success rather than just its endpoints. 【Book Arc】 - **Opening (~0%–10%)**: Frames what an API is, why businesses build them, and who the real users are—establishing that API design is a product and business decision, not just a technical one. - **Early (~10%–25%)**: Surveys API paradigms—request–response styles (REST, RPC, GraphQL) and event-driven options like WebSockets and WebHooks—so you can pick the right architectural shape before committing. - **Early (~25%–39%)**: Covers security fundamentals: authentication vs. authorization, OAuth flows, granular scopes, token validation, and WebHook security, with the warning that security is hard to change once shipped. - **Middle (~39%–48%)**: Moves into design best practices—developer experience, consistency, error design, versioning, and real-life use cases—showing how small design choices shape adoption. - **Late (~48%–end)**: A hands-on design exercise walks through a fictitious API end to end, turning earlier theory into a repeatable design process anchored in user experience. 【Key Takeaways】 - **APIs are products with users, not just interfaces** (Opening): The book insists you identify developer personas and hidden requirements before writing specs, because a technically correct API that ignores its users will fail. - **Design decisions are expensive to reverse** (Opening): Because switching API designs is costly for consumers, the authors argue for specifying and validating your API long before implementation begins. - **Pick your paradigm deliberately** (Early): REST, RPC, and GraphQL each carry distinct trade-offs in payload size, round trips, discoverability, and flexibility; the book compares them rather than declaring one winner. - **Event-driven APIs solve what request–response cannot** (Early): WebSockets and WebHooks enable real-time, push-based communication, and the book shows how real platforms use them for streaming events. - **Security should lean on proven standards** (Early): The authors caution against inventing your own security mechanism and walk through OAuth, granular scopes, token validation, and revocation as safer foundations. - **Granular permissions improve both trust and conversion** (Early): Slack's move from broad to 27 granular OAuth scopes illustrates how requesting only necessary access makes users more comfortable installing apps. - **Developer experience is a design discipline** (Middle): Interactive docs, SDKs, signup-free trials, and easy token generation reduce drop-off; consistency in naming and responses lets developers guess your API correctly. - **Errors and versioning deserve explicit design** (Middle): Organizing errors into status codes, machine-readable codes, and human-readable messages—plus planning for change—prevents breaking the apps that depend on you. 【Reading Tips】 - Read Chapters 1–2 closely if you are choosing an API style; the paradigm comparison tables are the highest-leverage material for early architectural decisions. - Treat the security chapter as a checklist rather than a tutorial—focus on OAuth flow steps, scope design, and token revocation, and skim protocol minutiae you can look up later. - Use the "Design in Practice" chapter as a template: work the fictitious scenario alongside your own API and mirror its process. - Skim the business-case and marketing material if you are purely an implementer, but return to it if you own adoption or platform strategy. - Keep the error-design and versioning sections bookmarked; they are easy to skip and painful to retrofit. 【Coverage Limits】 These excerpts cover the book's framing, paradigm comparisons, security, design best practices, and the start of the practical exercise, but do not include the full hands-on scenario, later chapters on scaling, marketing, or building a developer following. Specific implementation details beyond the sampled chunks are not represented here.
Page 5
ization 27 OAuth 28 WebHooks Security 42 Closing Thoughts 46 4. Design Best Practices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
View in text
Excerpt 2
r many of these topics in Chapters 2 through 4 of this book. Documentation and developer resources are also important to setting users up for success. We cov...
View in text
Excerpt 3
t more comfortable with giving applications access to limi‐ ted resources, which improved the conversion rate for application installations. Token and Scope...
View in text
Excerpt 4
You can build this into your API description language (see Chapter 7) or documentation mechanism. Think about the various layers of errors before writing the...
View in text
Excerpt 5
ack on the problem, the high-level solution, and the nitty- gritty details. Review your spec with others and solicit feedback on the design. Find a developer...
View in text
Excerpt 6
ith a handful of developers and partners. This way, you can iterate on the design based on their feedback before making the patterns generally available. Pag...
View in text
Excerpt 7
our developers, will help you be more successful in scaling your API. As you refine your API design, policies, and tools, these changes can sometimes affect...
View in text
Excerpt 8
ric and/or too complex. Developers building applications on (or using) your platform are building stuff for the “now.” They like to move quickly and are not...
View in text
Tags
AI categories
Web TechnologyBackendSoftware
ISBN: 1492026921
Publisher: O’Reilly Media
Publish Year: 2018
Language: English
Pages: 217
File Format: PDF
File Size: 9.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…