Adding a sub-tenant to the User Profiles Service (UPS)
Request
To add a sub-tenant to UPS, send a POST request to:
https://<host>:<port>/userprofiles/v1/admin/tenants
Headers
x-correlation-id
– identifier for logging, to correlate messages across a call flowAuthorization
– Keycloak authentication token. Must contain theadminRole
orprimaryTenantRole
role 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
The following arguments are in the request body:
status
– whether the tenant isENABLED
orDISABLED
_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 User Profiles Service (UPS) API documentation.