D
D
dmitriy2017-09-11 14:36:25
RESTful API
dmitriy, 2017-09-11 14:36:25

How to organize REST API correctly?

There are entities: the client's basket, the client, the current user of the system, and his basket. According to the storage scheme in the database, there will be two tables basket_items and clients,
but there will be a different organization url
/api/clients/ - all clients
/api/clients/1/basket-items/ - positions of basket 1 client
/api/current-client/basket -items/ - positions of the current client
1. There are doubts about the positions of the current client, is it correct?
2. Also, how to arrange to receive all the carts of all customers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bioGavs, 2017-09-11
@bioGavs

the rest is stateless. You shouldn't have current-client at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question