Appearance
POST
/global/tenant/tenantsRequired scope:
viskan-global:tenant:createCreates a new tenant in the Viskan platform.
Request body
JSON
{
"tenantName": "Viskan System AB",
"countryCode": "SE",
"organizationNumber": 5565901864,
"databaseHost": "viskanssql.viskan.local",
"databaseNameKey": "Viskan"
}
Response
The response contains the identifier of the newly created tenant.
JSON
{
"tenantId": "46c5b0b0-c42a-44b0-97e2-39ef2f9118ac"
}
| Error code | Description |
|---|---|
country-code-is-invalid | The given country code is not valid. |
database-host-is-required | A database host must be provided to create a tenant. |
database-name-is-unavailable | The database name generated by the given database name key is already used by another tenant. |
database-name-key-is-required | A database name key must be provided to create a tenant. |
organization-number-is-required | An organization number must be provided to create a tenant. |
tenant-name-is-required | A tenant name must be provided to create a tenant. |
tenant-name-is-unavailable | The given tenant name is already used by another tenant. |