B
B
beduin012017-02-13 22:15:54
RESTful API
beduin01, 2017-02-13 22:15:54

How correct is it to send customer and administrator data over one REST interface?

There are two user groups.
1. Admins
2. Clients
Designing RestAPI. I can not understand how to give user data. If everything is clear with users. /users/:id
When admins log in to get information about them, what address should I contact?
If the tables are different, then it seems that the IDs will be different. knocking on /users/:id is not correct.
On the other hand, you can, for example, access by the name /users/:login but also some not very good option. How to do it right?
There will simply be two types of users. Clients and customers.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question