Tenant Profile Management¶
Retrieve tenant details¶
-
GET
/api/v1/tenants/
(string: tenant_id)/
¶ Retrieve the tenant details.
The settings APIO_OBJECT_CREATION and TENANT_DATA=true enables the optional external ids data fields parameters.
Example request:
GET /api/v1/tenants/foo/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "defaultDomain": "netaxis.be", "name": "Enterprise Test", "supportEmail": "info@enterprise.be", "tenantId": "foo", "type": "Enterprise", "useCustomRoutingProfile": False, "useTenantLanguages": False }
Example response with optional external ids:
HTTP/1.1 200 OK Content-Type: "application/json" { "defaultDomain": "netaxis.be", "name": "Enterprise Test", "supportEmail": "info@enterprise.be", "tenantId": "foo", "type": "Enterprise", "useCustomRoutingProfile": False, "useTenantLanguages": False "externalId1": "", "externalId2": "", "externalId3": "", "externalId4": "" }
- Request JSON Object:
tenantId (string) – see tenantId from Tenant Detail Attributes.
type (string) – see type from Tenant Detail Attributes.
defaultDomain (string) – see defaultDomain from Tenant Detail Attributes.
useCustomRoutingProfile (boolean) – see useCustomRoutingProfile from Tenant Detail Attributes.
name (string) – see name from Tenant Detail Attributes.
contactInformation (object) – see contactInformation from Tenant Detail Attributes.
addressInformation (object) – see addressInformation from Tenant Detail Attributes.
useTenantLanguages (boolean) – see useTenantLanguages from Tenant Detail Attributes.
resellerId (string) – (Optional) see resellerId from Tenant Detail Attributes.
externalId1 (string) – (Optional) see externalId1 from Tenant Detail Attributes.
externalId2 (string) – (Optional) see externalId2 from Tenant Detail Attributes.
externalId3 (string) – (Optional) see externalId3 from Tenant Detail Attributes.
externalId4 (string) – (Optional) see externalId4 from Tenant Detail Attributes.
backendName (string) – (Optional) the name of the backend where the Tenant has to be created in case of multi-as set-up
backendExternalName (string) – (Optional) the external name of the backend where the Tenant has to be created in case of multi-as set-up (ignored if backendName is provided)
- Status Codes:
200 OK – no error
Update tenant details¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/
¶ Update the tenant details.
The settings APIO_OBJECT_CREATION and TENANT_DATA=true enables the optional external ids data fields parameters.
Example request:
PUT /api/v1/tenants/foo/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "supportEmail": "info@enterprise.test.be" }
- Request JSON Object:
defaultDomain (string) – see defaultDomain from Tenant Detail Attributes.
name (string) – see name from Tenant Detail Attributes.
contactInformation (object) – see contactInformation from Tenant Detail Attributes.
addressInformation (object) – see addressInformation from Tenant Detail Attributes.
useTenantLanguages (boolean) – see useTenantLanguages from Tenant Detail Attributes.
resellerId (string) – see resellerId from Tenant Detail Attributes. If present it will be propagated to all the Tenant’s Groups that have the current same resellerId
noResellerIdToGroups (boolean) – if present with value true, the resellerId field (if present) is not propagated to the Tenant’s Groups. No effect otherwhise.
forceResellerIdToGroups (boolean) – if present with value true, the resellerId field (if present) is propagated to all the Tenant’s Groups. No effect otherwhise. Ignored if noResellerIdToGroups is present and true.
templateName (optional) (string) – The name of the template to be used during the Tenant modification.
autoCreateDomain (boolean) – If the defaultDomain provided does not exist, will be created at System level and assigned to the Tenant.
externalId1 (string) – (Optional) see externalId1 from Tenant Detail Attributes.
externalId2 (string) – (Optional) see externalId2 from Tenant Detail Attributes.
externalId3 (string) – (Optional) see externalId3 from Tenant Detail Attributes.
externalId4 (string) – (Optional) see externalId4 from Tenant Detail Attributes.
backendName (string) – (Optional) the name of the backend where the Tenant has been moved in case of multi-as set-up. It only updates APIO DB, no change in the AS.
backendExternalName (string) – (Optional) the external name of the backend where the Tenant has been moved in case of multi-as set-up (ignored if backendName is provided). It only updates APIO DB, no change in the AS.
Example response:
- Response:
Similar to GET instance method response.
Example request with optional external ids:
PUT /api/v1/tenants/foo/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "supportEmail": "info@enterprise.test.be" }
Example response with optional external ids:
- Response:
Similar to GET instance method response with optional external ids.
- Status Codes:
200 OK – no error
400 Bad Request – Error during the processing of the request. With along others the following error cases:
UNAUTHORIZED_PARAMETER_FOR_USER_LEVEL (58): in case backendName or backendExternalName is sent and the connected user is not a multi-as admin user.
NO_BACKEND_AVAILABLE (61): in case the requested backendName or backendExternalName can not be used by the multi-as admin user. Or of the Tenant belongs to a backend that can not be used by the multi-as admin user.
Remove a tenant¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/
¶ Delete a tenant.
Example request:
DELETE /api/v1/tenants/foo/ HTTP/1.1 Host: example.com
- Request JSON Object:
deleteEvenIfNonEmpty (boolean) – (Optional) If this parameter is there with value true all the existing Groups in the Tenant will be deleted. This operation can not be rollbacked so it must be used with a lost of caution. Default value is obviously false.
_excludedAppIds (array) – (Optional) The delete will delete all EndUserAppData of the End Users of this Tenant, but it could occur that the caller still needs some of them and will take the responsibility to delete them afterwards. The format is an array of Application Ids (string). (from 1.11.1)
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
deletedGroupIds (array) – (Conditional) The list of Group Ids of the Groups that have been deleted. It is only present if deleteEvenIfNonEmpty is true and at least one Group was deleted.
- Status Codes:
200 OK – no error
Configuration Information for Tenant Update¶
In the PUT API, the APIO can create a TenantData object and can also auto-create a Reseller object with as name the resellerId if not existing.
The following settings is to instruct the APIO how to manage this:
"APIO_OBJECT_CREATION": {
"TENANT_DATA": true,
"RESELLER": true
}
"AUTO_CREATE": {
"TENANT_DEFAULT_DOMAIN": true
}
- Settings description:
APIO_OBJECT_CREATION: is a set of settings for controlling the auto-creation of different objects in APIO DB.
RESELLER if true, if a resellerId is received and the corresponding Reseller does not exist it will be created; if false in same conditions it will be rejected. Default is False.
TENANT_DATA if true, a TenantData object will be created if it was not existing. Note that if a resellerId is provided, a TenantData object will always be created if it was not existing. Default is False.
AUTO_CREATE.TENANT_DEFAULT_DOMAIN: If true, if the defaultDomain provided does not exist, will be created at System level and assigned to the Tenant. The behaviour can be overriden by the autoCreateDomain parameter within the input data. Default is False.
Template Information for Tenant¶
The template category is tenant
Tenant Detail Attributes¶
Name |
Type |
Methods |
Description |
|||
---|---|---|---|---|---|---|
GET |
POST |
PUT |
DELETE |
|||
tenantId |
String |
A |
R |
F |
F |
The unique id of the tenant. |
type |
String |
A |
R |
F |
F |
The type of the tenant. Can be “ServiceProvider” or “Enterprise”. |
useCustomRoutingProfile |
Boolean |
C |
C |
F |
F |
If set, the service will synchronize the Service Provider with the Network Server and create a new instance of the routing profile for the Service Provider. Only available with type=”ServiceProvider”. |
defaultDomain |
String |
A |
O |
O |
F |
The default domain of the tenant. |
name |
String |
A |
O |
O |
F |
The name of the tenant. |
supportEmail |
String |
O |
O |
O |
F |
The support email of the tenant. |
contactInformation |
Object |
O |
O |
O |
F |
The main contact information, see Contact Information attributes. |
addressInformation |
Object |
O |
O |
O |
F |
The address information, see Contact Information attributes. |
resellerId |
String |
O |
O |
O |
F |
The name of the Reseller owning this Tenant (if any). |
externalId1 |
String |
O |
O |
O |
F |
Possibility to store an external ID. No APIO logic associated. |
externalId2 |
String |
O |
O |
O |
F |
Possibility to store an external ID. No APIO logic associated. |
externalId3 |
String |
O |
O |
O |
F |
Possibility to store an external ID. No APIO logic associated. |
externalId4 |
String |
O |
O |
O |
F |
Possibility to store an external ID. No APIO logic associated. |
useTenantLanguages |
Boolean |
O |
O |
O |
F |
TODO |
Tenant Attributes in a List¶
Name |
Type |
Methods |
Description |
---|---|---|---|
GET |
|||
tenantId |
String |
A |
The unique id of the tenant. |
type |
String |
A |
The type of the tenant. Can be “ServiceProvider” or “Enterprise”. |
name |
String |
A |
The name of the tenant. |
resellerId |
String |
O |
The name of the Reseller owning this Tenant (if any). |
externalId1 |
String |
O |
Possibility to store an external ID. No APIO logic associated. |
externalId2 |
String |
O |
Possibility to store an external ID. No APIO logic associated. |
externalId3 |
String |
O |
Possibility to store an external ID. No APIO logic associated. |
externalId4 |
String |
O |
Possibility to store an external ID. No APIO logic associated. |
backendName |
String |
C |
The name of the Backend, only provided for a multi-as user, in a system search and if configured to return it. |
backendExternalName |
String |
C |
The external name of the Backend, same constraints as backendName. |