Skip to content

Add a Kaui API endpoint to create a tenant #627

Description

@reshmabidikar

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions