Adding a Tenant by using Webservice
You can add a tenant by using the tenant management servlet.
The following URL provides the configuration webservice, where you can create a tenant with its default set of property:
http://xxxxx/TAFJConfiguration/resources/configuration/tenant/{configuration_ID}/{tenant_Id}
Where,
- configuration_ID - The configuration ID which you want to add the tenant as a participant.
- tenant_Id - The tenant ID for the tenant to add to configuration.

To add a tenant identified with tenant2 to a configuration named master, use the following POST request:
curl --request POST \ --url http://localhost:8080/TAFJConfiguration/resources/configuration/tenant/master/tenant2
- In case of successful response, the service returns an HTTP code 200 with the properties of the newly created tenant.
{ "tenant created": "tenant2", "tenant2-tafj.configuration.version": "2019-04-01T15:48:41.796", "tenant2-temn.tafj.appserver.t24.notx.datasource": "java:/jdbc/t24LockingDS-tenant2", "tenant2-temn.tafj.runtime.cache": "false", "tenant2-temn.tafj.tenant.name": "", "tenant2-temn.tafj.appserver.tenant.authentication.role": "TAFJAdmin", "tenant2-temn.tafj.tenant.id": "tenant2", "tenant2-temn.tafj.tenant.status.enabled": "false", "tenant2-temn.tafj.runtime.timezone": "Europe/Paris", "tenant2-temn.tafj.tenant.description": "", "tenant2-temn.tafj.appserver.api.datasource": "java:/jdbc/apiDS-tenant2", "tenant2-temn.tafj.appserver.t24.ro.datasource": "java:/jdbc/t24RODS-tenant2", "tenant2-temn.tafj.runtime.local": "en_US", "tenant2-temn.tafj.appserver.t24.datasource": "java:/jdbc/t24DS-tenant2" }
- In case of already existing tenant ID, an HTTP code 500 Internal server error is returned.
System must be restarted after configuration change, if it is already running.
In this topic