Example: We have below operation:
GET /employees
I have to have functionality to allow filtering using multiple names as parameter. I represent it something like below:
GET /employees?empNames=xxx,yyy,zzz
But, now I don't have a parameter called empName, instead I have two parameters empFirstName and empSurname.
Which will be like below:
GET /employees?empFirstName=xx&empSurname=x
But I still need the API to accept multiple names(empFirstName and empSurname) filter.
I can see a few ways to represent it as below:
GET /employees?name=(xx,x),(yy,y),(zz,z)
GET /employees?name=xx:x,yy:y,zz:z
GET /employees?name=[{empFirstName=xx, empSurname=yy},{empFirstName=yy, empSurname=zz},{empFirstName=aa, empSurname=bb}]
What could be the best restful representation for such a filtering.
Are there any standards on which separator you need to use in the URI, a : or a , or something else? What's the simplest and best way to do this?