Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Nirmal Fernando
+1 for *HEAD /roles/{roleName} - *makes more sense and cleaner. If an user wants to pass the user store explicitly, shall we add a query param? *HEAD /roles/{roleName}?userstore=X * On Thu, Aug 8, 2019 at 11:38 AM Malintha Amarasinghe wrote: > When we return a 404, it implies that the URL (or

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Malintha Amarasinghe
When we return a 404, it implies that the URL (or the resource) does not exist. Here the URL/resource is */validate-role *(a controller resource) which always exists so it is wrong to return a 404 at any case. Thanks! On Thu, Aug 8, 2019 at 7:12 PM Menaka Jayawardena wrote: > Hi Naduni, > > Wh

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Menaka Jayawardena
Hi Naduni, Wh the GET request always returns 200? Can't we set the status code 404 if the role is not found? So we can check the response status from the UI. We do not want to read the body then. On Thu, Aug 8, 2019 at 6:05 PM Naduni Pamudika wrote: > Hi All, > > Thanks all for the

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Naduni Pamudika
Hi All, Thanks all for the suggestions. With the GET method @Bhathiya Jayasekara suggested, we have the following 2 options now. 1. *HEAD /roles/{roleName}* 2. *GET /validate-role?role=rolename* If we go with the option 1, it will simplify the work in the UI side while doing the role