Re: [Discuss] REST API Improvements

2015-04-28 Thread Isuru Haththotuwa
Hi Chamila, On Tue, Apr 28, 2015 at 5:00 PM, Chamila De Alwis wrote: > Hi Isuru, > > On Tue, Apr 28, 2015 at 4:36 PM, Isuru Haththotuwa > wrote: > >> IMHO we should expose whatever information we can from the Rest API, >> since its the interaction point with Stratos. In a scenario where a third

Re: [Discuss] REST API Improvements

2015-04-28 Thread Chamila De Alwis
Hi Isuru, On Tue, Apr 28, 2015 at 4:36 PM, Isuru Haththotuwa wrote: > IMHO we should expose whatever information we can from the Rest API, since > its the interaction point with Stratos. In a scenario where a third party > would need to integrate with Stratos via the Rest API it will be helpful

Re: [Discuss] REST API Improvements

2015-04-28 Thread Isuru Haththotuwa
Hi Lahiru, On Tue, Apr 28, 2015 at 3:50 PM, Lahiru Sandaruwan wrote: > Hi Isuru, > > Thanks for the input. > > On Tue, Apr 28, 2015 at 3:41 PM, Isuru Haththotuwa > wrote: > >> IMHO returning 500 internal server error here might not exactly convey >> the problem. AFAIU, RemoteException is thrown

Re: [Discuss] REST API Improvements

2015-04-28 Thread Lahiru Sandaruwan
Hi Isuru, Thanks for the input. On Tue, Apr 28, 2015 at 3:41 PM, Isuru Haththotuwa wrote: > IMHO returning 500 internal server error here might not exactly convey the > problem. AFAIU, RemoteException is thrown when we can't connect to a remote > host, maybe due to a network issue, or remote ho

Re: [Discuss] REST API Improvements

2015-04-28 Thread Isuru Haththotuwa
IMHO returning 500 internal server error here might not exactly convey the problem. AFAIU, RemoteException is thrown when we can't connect to a remote host, maybe due to a network issue, or remote host being offline, etc. It might be more explanatory to return 504 (Gateway Timeout), WDYT? On Tue,

Re: [Discuss] REST API Improvements

2015-04-28 Thread Anuruddha Liyanarachchi
+1 for throwing *500 Internal Server Error *for all the RemoteException. On Tue, Apr 28, 2015 at 2:23 PM, Lahiru Sandaruwan wrote: > Hi, > > I have fixed few success codes, and looking into error codes now. For all > the "RemoteException"s thrown due to service unavailability etc. we should >

Re: [Discuss] REST API Improvements

2015-04-28 Thread Gayan Gunarathne
On Tue, Apr 28, 2015 at 2:23 PM, Lahiru Sandaruwan wrote: > Hi, > > I have fixed few success codes, and looking into error codes now. For all > the "RemoteException"s thrown due to service unavailability etc. we should > through *500 Internal Server Error.* > > Wdyt? > +1. Those will be a inter

Re: [Discuss] REST API Improvements

2015-04-28 Thread Lahiru Sandaruwan
Hi, I have fixed few success codes, and looking into error codes now. For all the "RemoteException"s thrown due to service unavailability etc. we should through *500 Internal Server Error.* Wdyt? Thanks. On Sun, Apr 19, 2015 at 12:40 AM, Chamila De Alwis wrote: > Hi devs, > > After going thro

Re: [Discuss] REST API Improvements

2015-04-20 Thread Anuruddha Liyanarachchi
Hi, As per the present implementation the ID will be read from the JSON file, not from the parameter. Therefore two ID's can mismatch. In order to prevent ID mismatch we need to validate two IDs in the REST API. On Mon, Apr 20, 2015 at 3:24 PM, Dinithi De Silva wrote: > Yes Vishanth. We need

Re: [Discuss] REST API Improvements

2015-04-20 Thread Dinithi De Silva
Yes Vishanth. We need to change that too. There was a separate mail thread discussing about the response message structure. ([Question] Is is correct for two different status codes appear when adding a tenant?). We need to change successMessage to statusMessage in the response,but still there isn't

Re: [Discuss] REST API Improvements

2015-04-20 Thread Vishanth Balasubramaniam
On Sun, Apr 19, 2015 at 12:40 AM, Chamila De Alwis wrote: > Hi devs, > > After going through the REST API and the tickets that are raised for it, I > think we should do another round of refactoring on it. Most API methods > will stay unchanged, and there will be no additional methods added or > e

Re: [Discuss] REST API Improvements

2015-04-19 Thread Dinithi De Silva
Hi, Nice work in analyzing these Chamila. Me and Anuruddha are going to do the discussed changes to the REST API. Thanks On Sun, Apr 19, 2015 at 10:36 PM, Gayan Gunarathne wrote: > Good analysis Chamila. > > Please find some inline comments below. > > On Sun, Apr 19, 2015 at 12:40 AM, Chamila

Re: [Discuss] REST API Improvements

2015-04-19 Thread Gayan Gunarathne
Good analysis Chamila. Please find some inline comments below. On Sun, Apr 19, 2015 at 12:40 AM, Chamila De Alwis wrote: > Hi devs, > > After going through the REST API and the tickets that are raised for it, I > think we should do another round of refactoring on it. Most API methods > will sta

Re: [Discuss] REST API Improvements

2015-04-19 Thread Isuru Haththotuwa
Hi Chamila, Nice work in analyzing and summarizing the current limitations and possible improvements. Please find some comments inline On Sun, Apr 19, 2015 at 12:40 AM, Chamila De Alwis wrote: > Hi devs, > > After going through the REST API and the tickets that are raised for it, I > think we s

Re: [Discuss] REST API Improvements

2015-04-19 Thread Lahiru Sandaruwan
On Sun, Apr 19, 2015 at 12:42 PM, Chamila De Alwis wrote: > Hi Lahiru, > > On Sun, Apr 19, 2015 at 10:23 AM, Lahiru Sandaruwan > wrote: > >> If someone did a PUT with a resource which does not exist, it should add >> the resource and return 201, right? >> > > Thanks for the feedback. Yes, PUT is

Re: [Discuss] REST API Improvements

2015-04-19 Thread Chamila De Alwis
Hi Lahiru, On Sun, Apr 19, 2015 at 10:23 AM, Lahiru Sandaruwan wrote: > If someone did a PUT with a resource which does not exist, it should add > the resource and return 201, right? > Thanks for the feedback. Yes, PUT is required to create a resource and send 201 Created if it doesn't exist, h

Re: [Discuss] REST API Improvements

2015-04-18 Thread Imesh Gunaratne
+1 for suggestions except for below, we should be able to do these for 4.1.0 GA. IMO we can drop *202* and *209* status codes as being too granular. > 202 Accepted might be needed because application deployment and un-deployment are being executed in the background. On Sun, Apr 19, 2015 at 10:23

Re: [Discuss] REST API Improvements

2015-04-18 Thread Lahiru Sandaruwan
Hi Chamila, Great analysis, Please find the comments inline, On Sun, Apr 19, 2015 at 12:40 AM, Chamila De Alwis wrote: > Hi devs, > > After going through the REST API and the tickets that are raised for it, I > think we should do another round of refactoring on it. Most API methods > will stay

Re: [Discuss] REST API Improvements

2015-04-18 Thread Manula Thantriwatte
Hi, +1 for these changes. On Sun, Apr 19, 2015 at 3:10 AM, Chamila De Alwis wrote: > Hi devs, > > After going through the REST API and the tickets that are raised for it, I > think we should do another round of refactoring on it. Most API methods > will stay unchanged, and there will be no addi

[Discuss] REST API Improvements

2015-04-18 Thread Chamila De Alwis
Hi devs, After going through the REST API and the tickets that are raised for it, I think we should do another round of refactoring on it. Most API methods will stay unchanged, and there will be no additional methods added or existing methods removed. However there are some improvements that can b