Hi Gimantha, Did you refer REST API guidelines document attached in this mail[1] in architecture mailing list. When we develop REST APIs please follow that document and if you see anything missed there please let us know.
[1][Architecture] REST API Guidelines Thanks, sanjeewa. On Wed, Mar 23, 2016 at 8:01 PM, Gimantha Bandara <giman...@wso2.com> wrote: > Hi all, > > > We have a REST API in DAS to retrieve records in a specific table. It > supports GET method with the following url format. > > /analytics/tables/{tableName}/{from}/{to}/{start}/{count} > > Sending a GET request to above url will give the records between given > "from", "to" time range starting from index "start" with "count" page > size. > > Now we need to change the API, so that the user can define the record > columns/fields he wants. Current API will return the records with all the > values/columns. To do that, we can allow the user to define the columns he > needs, in the payload. But it seems that having a payload with a GET is not > the convention/the best practice. > > POST can be used to send the column names as a payload, but here we are > not making any updates to {tableName} resource. We will be just retrieving > records using a POST. So it also seems not the convention/the best practice. > > The only solution I can think of is, having a different resource path to > get the records with only specified fields/columns. Are there any other > solutions? > > Thanks, > Gimantha > > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Sanjeewa Malalgoda* WSO2 Inc. Mobile : +94713068779 <http://sanjeewamalalgoda.blogspot.com/>blog :http://sanjeewamalalgoda.blogspot.com/ <http://sanjeewamalalgoda.blogspot.com/>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev