Home / Companies / Redocly / Blog / Post Details
Content Deep Dive

Two approaches to API design - Resources vs Workflows

Blog post from Redocly

Post Details
Company
Date Published
Author
Adam Altman
Word Count
1,161
Company Posts That Month
2
Language
-
Hacker News Points
-
Post removed?
No
Summary

Designing an API involves a critical decision in choosing between a resource-first or a workflow-first approach, each having distinct implications for the API's design. The resource-first method begins with modeling domain entities as resources and implementing standard CRUD operations, offering predictability and alignment with REST principles, but it may lead to inefficiencies such as multiple calls for workflows and exposure of internal data structures. Alternatively, the workflow-first approach focuses on user needs by designing endpoints around key use cases, optimizing for usability and performance, though it requires a thorough understanding of the domain and can result in less predictable, RPC-style APIs. The most effective APIs often blend both approaches, starting with workflow considerations and validating with resources, thereby supporting efficient user workflows while maintaining a clear, resource-based structure. This hybrid approach allows for flexibility, catering to both complex workflows and simple operations, ensuring that the API is both intuitive for users and easy to evolve over time.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Developer Experience 2 751 292 103 +58%
LLM 2 4,863 783 205 +34%
MCP 2 4,861 352 133 +57%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.