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

Reply via email to