I am trying to understand the RESTful resource architecture. I understand that HTTP GET /accountswill not list accounts, and GET /accounts/123will not provide information about this account. How to implement active management in the RESTful architecture, for example, transfer money from account A to account B?
/accounts
/accounts/123
Consider declaring the transaction itself as a resource so that you can work on one resource atomically:
POST /transaction -> /transaction/456
I suggest avoiding HTTP PUTin this case, because idempotency is not what we want for this resource.
HTTP PUT
A B.