+1 for GET /tenants/{tenantDomain} On Thu, Nov 20, 2014 at 5:44 AM, Udara Liyanage <ud...@wso2.com> wrote:
> > Hi, > > We have the following REST API method which IMO should be > removed/deprecated. IMO it is not the RESTfull way of doing. Client should > determine the availability of domain by sending a GET /tenants/{domains} > and determine the availability by looking at the response of it. > Further this should be GET, not POST > > @POST > @Path("tenant/availability/{tenantDomain}") > @Consumes("application/json") > @AuthorizationAction("/permission/protected/manage/modify/tenants") > @SuperTenantService(true) > public Response isDomainAvailable(@PathParam("tenantDomain") String > tenantDomain) throws RestAPIException { > boolean available; > try { > available = CommonUtil.isDomainNameAvailable(tenantDomain); > } catch (Exception e) { > String msg = "Error in checking domain " + tenantDomain + " is > available"; > log.error(msg, e); > throw new RestAPIException(msg); > } > // return a boolean > return Response.ok(available).build(); > } > > > WDYT? > -- > > Udara Liyanage > Software Engineer > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > web: http://udaraliyanage.wordpress.com > phone: +94 71 443 6897 > -- Best Regards, Nirmal Nirmal Fernando. PPMC Member & Committer of Apache Stratos, Senior Software Engineer, WSO2 Inc. Blog: http://nirmalfdo.blogspot.com/