Description
Add a new endpoint in Kaui that allows creating a new tenant. This will enable Aviate to provision tenants programmatically instead of relying on manual creation through the UI.
Request Parameters
The endpoint should accept the following inputs:
- name – Tenant name
- tenantKey – Kill Bill tenant key
- tenantSecret – Kill Bill tenant secret
- kbTenantId – Kill Bill tenant ID
Requirements
- Add a new authenticated API endpoint to create a tenant.
- Validate the request and return appropriate error responses for invalid or duplicate requests.
- On successful creation:
- Create a record in the
kaui_tenants table using the supplied tenant information.
- Create the corresponding record in the
kaui_allowed_user_tenants table to grant access to the newly created tenant.
- Return the details of the newly created tenant on success.
- Follow Kaui's existing authentication and authorization mechanisms.
Acceptance Criteria
- A new authenticated endpoint is available for creating tenants.
- The endpoint accepts
name, tenantKey, tenantSecret, and kbTenantId as input.
- Invoking the endpoint creates a new record in
kaui_tenants and kaui_allowed_user_tenants tables .
- Invalid or duplicate requests return appropriate HTTP error responses.
- The endpoint is covered by automated tests.
- API documentation is updated with the request and response format.
Description
Add a new endpoint in Kaui that allows creating a new tenant. This will enable Aviate to provision tenants programmatically instead of relying on manual creation through the UI.
Request Parameters
The endpoint should accept the following inputs:
Requirements
kaui_tenantstable using the supplied tenant information.kaui_allowed_user_tenantstable to grant access to the newly created tenant.Acceptance Criteria
name,tenantKey,tenantSecret, andkbTenantIdas input.kaui_tenantsandkaui_allowed_user_tenantstables .