Hi, Initial discussion on this can be found at thread "[Dev][ES-Rest API] Unifying API response messages".
Even with the current model we send header information separately. Yes, we can remove "data" envelope. As Manoj has mentioned we have filtered out API responses from "data" envelop in our internal API calls. We'll have to change those places as well.(ex: pagination etc.) Idea of having 'data' envelop is to unify the responses. And if we will need to send payload attributes other than 'data', we can simply introduce another field(key:value pair) to response without breaking available model and references to api calls, and filter out at the receiving end. In such scenario, having 'data' field is self-expressive. I was referring docs like [01][02][03], and didn't noticed that this is against REST standards.(if it is my bad :P). In that case we can re-factor the value of 'data' not to break parsers. If we will not have such requirements we can remove "data" envelop. [01] http://labs.omniti.com/labs/jsend [02] http://jsonapi.org/ [03] http://developer.genability.com/documentation/basics/responses/ On Mon, Sep 22, 2014 at 8:22 PM, Manuranga Perera <[email protected]> wrote: > > moving to DEV. > > +1 for removing "data" envelop > > -- > With regards, > *Manu*ranga Perera. > > phone : 071 7 70 20 50 > mail : [email protected] > -- *Ayesha Dissanayaka* Software Engineer, WSO2, Inc : http://wso2.com <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> 20, Palmgrove Avenue, Colombo 3 E-Mail: [email protected] <[email protected]>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
