Hi devs,

I recently worked on porting tenant mgt operations to REST API. Below is
the API i came up with.

Main operations,

- addTenant
- deleteTenant
- updateTenant
- getTenant
- search tenants by a String
- activateTenant
- deactivateTenant
 - getCompleteTenantList



API i came up with,

Considered tenant as a resource,
the below string is formatted as , operation, HTTPMethod, REST endpoint,
payload

- addTenant  , POST, /admin/tenant, tenantInfoBean as a JSON payload
- deleteTenant, DELETE, /admin/tenant/{tenantDomain}
- updateTenant, PUT, /admin/tenant, tenantInfoBean as a JSON payload
- getTenant, GET, /admin/tenant/{tenantDomain}

The other operations are kind of utility operations. I could not co-relate
them to any resource.

- search tenants by a String, GET, /admin/tenant/search/{searchString}
- activateTenant , POST, /admin/tenant/activate/{tenantDomain}
- deactivateTenant, POST, /admin/tenant/deactivate/{tenantDomain}
 - getCompleteTenantList, GET, /admin/tenant/list


I used POST method in tenant activate/deactivate operations, because it
modifies the tenant aspect...
IMHO we do not need versioning info in our REST API endpoints. There will
be one stratos controller for a given setup and I do not see a use case for
maintaining two different version of the same admin API..


I have attached the patch for above implementation, to the JIRA [1]

The above API is open for discussion and i can change the current impl if
required..

[1] https://issues.apache.org/jira/browse/STRATOS-152



On Fri, Oct 4, 2013 at 11:07 PM, Pradeep Fernando <[email protected]>wrote:

> Hi All,
>
> This thread is to discuss about the admin services required by Stratos
> Controller and its API definitions.
>
> your thoughts/suggestions are highly appreciated.
>
> thanks,
> --Pradeep
>



-- 
Pradeep Fernando.
http://pradeepfernando.blogspot.com/

Reply via email to