REST complex web request with GET -


I am working on a REST service and so far all questions have been recovered using a GET request . Right now we are using a kind of routing rule like this:

  get API / person / {ID} http://api.com/person/1  < / Pre> 

Now, if I want to ask the REST API "Please give me a person with FisrtName = 'Pippo'" I have a complex DTO which I called PersonQueryDTO The REST method can be sent to interview the database using query criteria.

Is this a good way to do or should I create complex questions in a different way? It is important for me to keep the rest of the principles.

If you want to be with the rest of the principles, then in order to do something like this in the URL Supply of additional parameters eg

  GET API / Individual? FirstName = SomeName  

REST is about identifying all resources , the API / person your person And additional parameters are nothing but meta data to serve internally to determine which type of return result.


Comments