Request
To add a sub-tenant to ADM, send a POST request to:
https://<host>:<port>/adm/v1/admin/tenants
Headers
-
x-correlation-id– identifier for logging, to correlate messages across a call flow -
Authorization– Keycloak authentication token. Must contain theadminRoleorprimaryTenantRolerole and be prefixed with 'Bearer' (note the space). -
nv-authorizations– Request AuthN token with SMS privilege. Only required in deployments that use SSP. -
Content-Type: application/json
Mandatory arguments
All the following arguments are in the request body:
-
status– whether the tenant isENABLEDorDISABLED -
archiveConfiguration– block that determines whether inactive accounts are archived or not for this tenant. It contains the following:-
status– whether archiving isENABLEDorDISABLED -
interval– how often archiving is performed -
minimumAge– the minimum age for an inactive account (since creation) to qualify for archiving
-
-
_id– the tenant ID. This must comply with the naming convention – see Tenant naming convention.
Response
A successful request returns an HTTP 201 status.
A bad request returns an HTTP 400 status.
A request with an invalid token returns an HTTP 403 status.
Example
A successful request returns the ID of the tenant that was created:
{
"_id": "primary-tenant_sub-tenant-1"
}
See also
For full details of this API, see the Account and Device Manager (ADM) API documentation .