I want to design an API call following REST principles.
Let's assume I want to get users info where Users are identified with ids.
With a GET method, the call would look : /users?id=XXXXX, YYYYY, ....
The problem with this is : what happens when the list of users sent is too big ? The URI size limit is reached.
With a POST method, the call would look like : /users
and the request body would look like :
{"users": [XXXXX, YYYYY]}As far as I know, GET method should only be used to read data, and POST method to create new resources.
How should I design this properly ?