Hi Lashantha

Few corrections according to WSO2 REST API guidelines [1].

1. The POST should return 201 Created response.
2. And as a practice we do not use 500 error codes in API interface.
3. If the tenant is already exist you can send a 400 Bad Rest with error
json explaining what went wrong.

If you want an example please refer [2] and [3].

Best Regards
Jo



[1] http://wso2.com/whitepapers/wso2-rest-apis-design-guidelines/
[2]
https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/resources/store-api.yaml
[3] https://docs.wso2.com/display/AM200/apidocs/store/

On Fri, Nov 18, 2016 at 1:27 PM, Dilan Udara Ariyaratne <dil...@wso2.com>
wrote:

> Hi Lasantha,
>
> I did go through the list of REST APIs that you have defined in the
> swagger doc.
> But I have not found any API for doing an update to an existing tenant as
> well as deactivation.
>
> Are we skipping those capabilities found in C4 based multi-tenancy, here ?
>
> Regards,
> Dilan.
>
>
> *Dilan U. Ariyaratne*
> Senior Software Engineer
> WSO2 Inc. <http://wso2.com/>
> Mobile: +94766405580 <%2B94766405580>
> lean . enterprise . middleware
>
>
> On Wed, Nov 16, 2016 at 11:12 AM, Imesh Gunaratne <im...@wso2.com> wrote:
>
>> On Tue, Nov 15, 2016 at 5:00 PM, Lasantha Samarakoon <lasant...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> We are currently working on implementing multitenancy for Carbon-5 based
>>> products. In order to implement this we are creating Kubenetes namespaces
>>> for each tenant (namespaces provides isolation between tenants and the same
>>> approach has been used by WSO2 cloud as well).
>>>
>>> In most of the customer use cases, the tenants can be defined at the
>>> deployment time, but in order to cater SaaS requirements the tenants has to
>>> be created dynamically. To achieve this we have built a REST API using
>>> Microservices[1] (please find the attached Swaggger definition of the API).
>>> This API provides a endpoints for basic CRUD operations on tenants on
>>> Kubenetes cluster.
>>>
>>
>> ​Great work Lasantha! Can you please share the API resource/method list
>> in text​
>>
>> ​format?​
>>
>>>
>>> So in order to proceed with this what are the options to integrate this
>>> with the platform? Do we need to implement a UUF component and/or a CLI as
>>> well?
>>>
>>
>> ​May be we can write a bash script first and later move to a CLI/UI.
>>
>> ​I think we would also need to expose methods for automating the
>> deployment process once tenants/namespaces are created. Each WSO2 product
>> would release required K8S defnitions together with the product releases.
>>
>> ​Thanks​
>>
>>>
>>> [1] https://github.com/lasanthaS/wso2-carbon5-multitenancy-api
>>>
>>>
>>> Regards,
>>>
>>> *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
>>>
>>
>>
>>
>> --
>> *Imesh Gunaratne*
>> Software Architect
>> WSO2 Inc: http://wso2.com
>> T: +94 11 214 5345 M: +94 77 374 2057
>> W: https://medium.com/@imesh TW: @imesh
>> lean. enterprise. middleware
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to