From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8

Create Tenant from Template JSON Data

This method creates a tenant from a template and an administrator for this tenant (sets login ID, first name, last name, email, and password).

A template is a ZIP file produced as a result of a previous manual export via the Service Provider application or using the Export tenant method that has to be deployed on external HTTP servers. Only templates with the same database version can be used.

A template is configured with the access numbers obtained during tenant export. When using the template for tenant creation, these numbers can be replaced with actual access numbers as defined by parameter numberMap. This parameter is optional.

This method creates access numbers if they did not exist and assigns them to the tenant. It does not assign them to trunks. If exactly the same range (first number and block length) of access numbers existed but was not assigned to the tenant, this method will assign them. If the access numbers existed but were assigned to a different tenant, they will be silently ignored.

This method does not import calling lists data or audit change history.

Note that the created tenant will have the status Inactive. It has to be made Active either manually or by using the Activate tenant method.


Request

URL http[s]://<host>:<port>/configapi/v2/selfservice/tenant/<tenant_url>
Method POST
Body Administrator and template parameters (content type: application/JSON)
Example
{
   "tenantName":"tenant name",
   "numberMap":{
        "0000000000":"1234567890",
        "0000000001":"1987654321"
    }
   "firstName":"firstName",
   "lastName":"lastName",
   "loginId":"loginId",
   "password":"password",
   "email":"nowhere@net",
   "templateUrl":"http://host:port/tenantTemplate”,
   “lockTimeout”:120
} 


Response

Code Description
200 Success
400 Bad arguments
403 Access denied
409 Constraint violations
500 Server error
503 Lock timeout


< Previous | Next >
< Previous | Next >