Re: [Dev] [Dashboard] Refactoring dashboard API patterns
Hi Lakshman, In this case we send the complete JSON to the update API, so the JSON can contain multiple modified fields. So from the database level we modify the fields of the record accordingly. *Lasantha Samarakoon* | Software Engineer WSO2, Inc. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 (71) 214 1576 Email: lasant...@wso2.com Web:www.wso2.com lean . enterprise . middleware On Wed, May 31, 2017 at 2:15 PM, Lakshman Udayakantha wrote: > Hi Lasantha, > > On Wed, May 31, 2017 at 1:57 PM, Lasantha Samarakoon > wrote: > >> Hi all, >> >> ATM Dashboard UUF component is exposing set of REST APIs to perform CRUD >> operations on the artifacts such as dashboards, layouts and widgets. But >> these APIs don't have proper URL patterns associated, hence we are planning >> on refactoring these APIs [1]. We had a offline discussion regarding this >> and came-up with the following URLs. >> >> *Dashboards:* >> >>- GET apis/dashboards >>Returns list of dashboards. >> >>- GET apis/dashboards/{id} >>Returns specific dashboard identified by Id. >> >>- POST apis/dashboards >>Create new dashboard. >> >>- PUT apis/dashboards/{id} >>Update existing dashboard identified by Id. >> >> Is this a partial update or complete replace? > >> >>- >>- DELETE apis/dashboards/{id} >>Delete existing dashboard identified by Id. >> >> *Layouts:* >> >>- GET apis/layouts >>Returns list of layouts. >> >> *Widgets:* >> >>- GET apis/widgets/ >>Returns list of widgets. >> >>- GET apis/widgets/{id}/conf >>Returns configurations of a widget identified by Id. >> >>- GET apis/widgets/{id}/thumbnail >>Returns thumbnail of a widget identified by Id. >> >> >> Appreciate your feedback on this. >> >> [1] https://github.com/wso2/carbon-dashboards/issues/496 >> >> >> Thanks, >> >> *Lasantha Samarakoon* | Software Engineer >> WSO2, Inc. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 (71) 214 1576 <+94%2071%20214%201576> >> Email: lasant...@wso2.com >> Web:www.wso2.com >> >> lean . enterprise . middleware >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Lakshman Udayakantha > WSO2 Inc. www.wso2.com > lean.enterprise.middleware > Mobile: *0717429601* > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [Dashboard] Refactoring dashboard API patterns
Hi Lasantha, On Wed, May 31, 2017 at 1:57 PM, Lasantha Samarakoon wrote: > Hi all, > > ATM Dashboard UUF component is exposing set of REST APIs to perform CRUD > operations on the artifacts such as dashboards, layouts and widgets. But > these APIs don't have proper URL patterns associated, hence we are planning > on refactoring these APIs [1]. We had a offline discussion regarding this > and came-up with the following URLs. > > *Dashboards:* > >- GET apis/dashboards >Returns list of dashboards. > >- GET apis/dashboards/{id} >Returns specific dashboard identified by Id. > >- POST apis/dashboards >Create new dashboard. > >- PUT apis/dashboards/{id} >Update existing dashboard identified by Id. > > Is this a partial update or complete replace? > >- >- DELETE apis/dashboards/{id} >Delete existing dashboard identified by Id. > > *Layouts:* > >- GET apis/layouts >Returns list of layouts. > > *Widgets:* > >- GET apis/widgets/ >Returns list of widgets. > >- GET apis/widgets/{id}/conf >Returns configurations of a widget identified by Id. > >- GET apis/widgets/{id}/thumbnail >Returns thumbnail of a widget identified by Id. > > > Appreciate your feedback on this. > > [1] https://github.com/wso2/carbon-dashboards/issues/496 > > > Thanks, > > *Lasantha Samarakoon* | Software Engineer > WSO2, Inc. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 (71) 214 1576 <+94%2071%20214%201576> > Email: lasant...@wso2.com > Web:www.wso2.com > > lean . enterprise . middleware > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Lakshman Udayakantha WSO2 Inc. www.wso2.com lean.enterprise.middleware Mobile: *0717429601* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [Dashboard] Refactoring dashboard API patterns
Hi all, ATM Dashboard UUF component is exposing set of REST APIs to perform CRUD operations on the artifacts such as dashboards, layouts and widgets. But these APIs don't have proper URL patterns associated, hence we are planning on refactoring these APIs [1]. We had a offline discussion regarding this and came-up with the following URLs. *Dashboards:* - GET apis/dashboards Returns list of dashboards. - GET apis/dashboards/{id} Returns specific dashboard identified by Id. - POST apis/dashboards Create new dashboard. - PUT apis/dashboards/{id} Update existing dashboard identified by Id. - DELETE apis/dashboards/{id} Delete existing dashboard identified by Id. *Layouts:* - GET apis/layouts Returns list of layouts. *Widgets:* - GET apis/widgets/ Returns list of widgets. - GET apis/widgets/{id}/conf Returns configurations of a widget identified by Id. - GET apis/widgets/{id}/thumbnail Returns thumbnail of a widget identified by Id. Appreciate your feedback on this. [1] https://github.com/wso2/carbon-dashboards/issues/496 Thanks, *Lasantha Samarakoon* | Software Engineer WSO2, Inc. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 (71) 214 1576 <+94%2071%20214%201576> Email: lasant...@wso2.com Web:www.wso2.com lean . enterprise . middleware ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev