state transition
A change of a resource from one state to another, such as a task moving from open to done, modelled as its own resource.
In more detail
Hypermedia can offer a transition only when the current state allows it. Modelling the transition as a resource makes its rules, status codes and retries explicit.
Example
In the APIs course: Instead of hiding a verb in a path, the course models completion as /tasks/3/completion and uses PUT, which is idempotent, so repeating it is harmless.Related terms
- CRUD — Short for create, read, update and delete, the four basic things you can do to stored data.
- hypermedia — Links placed inside representations so clients discover related resources and available actions instead of building addresses themselves.
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
Taught in
- Actions That Do Not Fit CRUD — Modern API Architecture: REST, GraphQL & gRPC
- HATEOAS And Hypermedia — Modern API Architecture: REST, GraphQL & gRPC