API Design Guidance: Extended CRUD
Blog post from Tyk
API design often requires moving beyond the traditional CRUD model to accommodate actions like submit, approve, and decline, which are essential for capturing state transitions in business workflows. By using specific HTTP methods and adopting a clear URL convention, API designers can effectively extend resource lifecycles, providing fine-grained access control and improved auditability by assigning unique URLs to different actions. For instance, in a content management system, operations such as POST /articles/{articleId}/submit or /approve allow for explicit workflows without relying solely on modifying a status field through PATCH requests. This approach not only enhances flexibility and security but also enables consumers to easily understand available actions based on their permissions, thus making the workflow more transparent and manageable.