Tenants
- Last UpdatedSep 08, 2023
- 7 minute read
APIs to manage a Customer Tenant. A tenant represents the set of services, applications, data, and configuration state available to a customer. Users are associated with a tenant via at least one configured identity provider and access to resources can be managed for those users via the assignment of roles. Data and services provided by a tenant may also span geographical regions. A tenant has APIs to manage a customer tenant. Unlike namespaces, tenants are not scoped to a region. Tenant level information, such as users and clients, is stored in all supported regions for read-only purposes. Write operations for tenant management and identity and access management are only supported through the global base URL, such as https://uswe.datahub.connect.aveva.com/Tenants/{tenantId}. Requests to local URLs will return a status of Method Not Allowed (405). Tenant level information, such as users and clients, is stored in all supported regions for read-only purposes.
Get Tenant
Returns a specific Tenant by the identifier.
Request
GET /api/v1/Tenants/{tenantId}
Parameters
string tenantId
The identifier of the Tenant.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | TenantWithProperties | The Tenant with Id tenantId. |
| 400 | None | Could not retrieve the specified TenantWithPropertiess due to missing or invalid input. |
| 403 | None | Forbidden. |
Example response body
200 Response
{
"Id": "7fc97c8b-8f60-4f29-af71-3178c414e7a0",
"CompanyName": "CompanyName",
"State": 1,
"Created": "2021-07-23T15:54:07.523Z",
"LastUpdated": "2021-07-23T15:54:10.873Z",
"Alias": "CompanyAlias",
"Features": [
{
"Feature": {
"Id": "95c2b5fe-355d-4b33-a748-b738707e0648",
"Name": "FeatureName",
"Description": "Feature Description"
},
"CurrentState": 1
}
],
"Entitlements": [
{
"EntitlementDefinitionId": "NamespaceCount",
"EntitlementType": 1,
"Value": 5
},
{
"EntitlementDefinitionId": "Region-NA",
"Value": 1
},
{
"EntitlementDefinitionId": "StreamAccessCount",
"EntitlementType": 2,
"LimitType": 1,
"Value": 1000
},
{
"EntitlementDefinitionId": "StreamCount",
"EntitlementType": 1,
"LimitType": 1,
"Value": 1000
}
],
"TenantType": "Unlinked"
}
Authorization
Allowed for these roles:
- Tenant Member
Tenant Exists
Checks if a Tenant with a specific identifier exists.
Request
HEAD /api/v1/Tenants/{tenantId}
Parameters
string tenantId
The identifier of the Tenant.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | HTTP 204 status code if a Tenant with tenantId exists. |
| 400 | None | Could not check the Tenant due to missing or invalid input. |
| 404 | None | Not Found. |
Authorization
Allowed for these roles:
- Tenant Member
Update Tenant
Updates a specified Tenant object.
Request
PUT /api/v1/Tenants/{tenantId}
Parameters
string tenantId
The identifier of the Tenant.
Request Body
The updated details of the Tenant.
{
"Id": "string",
"CompanyName": "string",
"State": 0,
"Created": "2019-08-24T14:15:22Z",
"LastUpdated": "2019-08-24T14:15:22Z",
"Alias": "string",
"Features": [
{
"Feature": {
"Id": "string",
"Name": "string",
"Description": "string",
"DefaultState": 0
},
"CurrentState": 0
}
],
"ExternalAccountId": "string",
"TenantType": "string"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Tenant | The updated Tenant with Id tenantId. |
| 400 | None | Could not return the Tenant due to missing or invalid input. |
| 403 | None | Forbidden. |
| 405 | None | Method not allowed at this base URL. Try the request again at the Global base URL. |
Example response body
200 Response
{
"Id": "7fc97c8b-8f60-4f29-af71-3178c414e7a0",
"CompanyName": "CompanyName",
"State": 1,
"Created": "2021-07-23T15:54:07.523Z",
"LastUpdated": "2021-07-23T15:54:10.873Z",
"Alias": "CompanyAlias",
"Features": [
{
"Feature": {
"Id": "95c2b5fe-355d-4b33-a748-b738707e0648",
"Name": "FeatureName",
"Description": "Feature Description"
},
"CurrentState": 1
}
],
"TenantType": "Unlinked"
}
Authorization
Allowed for these roles:
- Tenant Administrator
Get Tenant Icon
Returns an icon specified by its Tenant identifier.
Request
GET /api/v1/Tenants/{tenantId}/Icon
Parameters
string tenantId
The identifier of the Tenant.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | string | The icon associated with the Tenant. |
| 400 | None | Could not return the icon for the Tenant due to missing or invalid input. |
| 403 | None | Forbidden. |
Example response body
200 Response
"IconImageString"
Authorization
Allowed for these roles:
- Tenant Member
Create Or Update Tenant Icon
Creates or updates the icon for a Tenant. Note that the icon size must be less than ExtendedSystemController.MaxIconSizeInBytes bytes in size.
Request
PUT /api/v1/Tenants/{tenantId}/Icon
Parameters
string tenantId
The identifier of the Tenant.
Request Body
The Base64 encoded PNG icon for the Tenant.
"string"
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | string | The updated icon associated with the Tenant. |
| 400 | None | Could not return the icon for the Tenant due to missing or invalid input. |
| 403 | None | Forbidden. |
| 405 | None | Method not allowed at this base URL. Try the request again at the Global base URL. |
Example response body
200 Response
"IconImageString"
Authorization
Allowed for these roles:
- Tenant Administrator
Delete Tenant Icon
Deletes the icon for a Tenant.
Request
DELETE /api/v1/Tenants/{tenantId}/Icon
Parameters
string tenantId
The identifier of the Tenant.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | HTTP status code: 204 on successful deletion or another HTTP status codes on failure. |
| 400 | None | Could not delete the icon for the Tenant due to missing or invalid input. |
| 403 | None | Forbidden. |
| 405 | None | Method not allowed at this base URL. Try the request again at the Global base URL. |
Authorization
Allowed for these roles:
- Tenant Administrator
List Regions
Returns the RegionBase list for the specified Tenant.
Request
GET /api/v1/Tenants/{tenantId}/Regions
Parameters
string tenantId
The identifier of the Tenant.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | RegionBase[] | The RegionBase list associated with the Tenant. |
| 403 | None | Forbidden. |
| 404 | None | Not Found. |
Example response body
200 Response
[
{
"Id": "WestEurope",
"Name": "West Europe",
"BaseAddress": "https://euno.datahub.connect.aveva.com/"
},
{
"Id": "WestUS",
"Name": "West US",
"AdministrativeEndpointsWritable": true,
"BaseAddress": "https://uswe.datahub.connect.aveva.com"
}
]
Authorization
Allowed for these roles:
- Tenant Member
Definitions
TenantWithProperties
Tenant with entitlements.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | Gets or sets the identifier. |
| CompanyName | string | false | true | Gets or sets the name of the company. |
| State | TenantProvisioningState | false | false | Gets or sets the state. |
| Created | date-time | false | false | Gets or sets the date of tenant creation in database. |
| LastUpdated | date-time | false | false | Gets or sets the last updated. |
| Alias | string | false | true | Gets or sets the alias. |
| Features | [FeatureState] | false | true | Gets or sets the features. |
| ExternalAccountId | string | false | true | Gets or sets the external account identifier. |
| TenantType | string | false | true | Gets or sets tenant type. |
| Entitlements | [TenantEntitlementInstance] | false | true | Gets or sets the entitlements. |
{
"Id": "string",
"CompanyName": "string",
"State": 0,
"Created": "2019-08-24T14:15:22Z",
"LastUpdated": "2019-08-24T14:15:22Z",
"Alias": "string",
"Features": [
{
"Feature": {
"Id": "string",
"Name": "string",
"Description": "string",
"DefaultState": 0
},
"CurrentState": 0
}
],
"ExternalAccountId": "string",
"TenantType": "string",
"Entitlements": [
{
"EntitlementDefinitionId": "string",
"EntitlementType": 0,
"LimitType": 0,
"Value": 0,
"ManualBlockStatus": true
}
]
}
TenantProvisioningState
Status codes describing a tenant's current provisioning state.
Enumerated Values
| Property | Value | Description |
|---|---|---|
| Creating | 0 | Status codes describing a tenant's current provisioning state. |
| Active | 1 | Status codes describing a tenant's current provisioning state. |
| Deactivating | 2 | Status codes describing a tenant's current provisioning state. |
| Deactivated | 3 | Status codes describing a tenant's current provisioning state. |
| Reactivating | 4 | Status codes describing a tenant's current provisioning state. |
| Deleting | 5 | Status codes describing a tenant's current provisioning state. |
| Deleted | 6 | Status codes describing a tenant's current provisioning state. |
| Purging | 7 | Status codes describing a tenant's current provisioning state. |
| IsHomeTenant | 8 | Status codes describing a tenant's current provisioning state. |
| Locking | 9 | Status codes describing a tenant's current provisioning state. |
| Locked | 10 | Status codes describing a tenant's current provisioning state. |
| Unlocking | 11 | Status codes describing a tenant's current provisioning state. |
FeatureState
Representation of a server-side database interpretation of a feature state.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Feature | Feature | false | true | Gets or sets the feature. |
| CurrentState | int32 | false | false | Gets or sets the current state of the feature. |
{
"Feature": {
"Id": "string",
"Name": "string",
"Description": "string",
"DefaultState": 0
},
"CurrentState": 0
}
Feature
Representation of a server-side database interpretation of a feature.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | Gets or sets the identifier. |
| Name | string | false | true | Gets or sets the name. |
| Description | string | false | true | Gets or sets the description. |
| DefaultState | int32 | false | false | Gets or sets the default state. |
{
"Id": "string",
"Name": "string",
"Description": "string",
"DefaultState": 0
}
TenantEntitlementInstance
An instance of an entitlement.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| EntitlementDefinitionId | string | false | true | Gets or sets the identifier of the corresponding entitlement definition. |
| EntitlementType | EntitlementType | false | false | Gets or sets the EntitlementType. |
| LimitType | LimitType | false | false | Gets or sets the Limit type. |
| Value | int32 | false | false | Gets or sets the value. |
| ManualBlockStatus | boolean | false | false | Gets or sets a value indicating whether or not there is a manual block. |
{
"EntitlementDefinitionId": "string",
"EntitlementType": 0,
"LimitType": 0,
"Value": 0,
"ManualBlockStatus": true
}
EntitlementType
The type of entitlement.
Enumerated Values
| Property | Value |
|---|---|
| Feature | 0 |
| Resource | 1 |
| Usage | 2 |
LimitType
The limit type of entitlement.
Enumerated Values
| Property | Value |
|---|---|
| Hard | 0 |
| Soft | 1 |
Tenant
Representation of a server-side database interpretation of a tenant.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | Gets or sets the identifier. |
| CompanyName | string | false | true | Gets or sets the name of the company. |
| State | TenantProvisioningState | false | false | Gets or sets the state. |
| Created | date-time | false | false | Gets or sets the date of tenant creation in database. |
| LastUpdated | date-time | false | false | Gets or sets the last updated. |
| Alias | string | false | true | Gets or sets the alias. |
| Features | [FeatureState] | false | true | Gets or sets the features. |
| ExternalAccountId | string | false | true | Gets or sets the external account identifier. |
| TenantType | string | false | true | Gets or sets tenant type. |
{
"Id": "string",
"CompanyName": "string",
"State": 0,
"Created": "2019-08-24T14:15:22Z",
"LastUpdated": "2019-08-24T14:15:22Z",
"Alias": "string",
"Features": [
{
"Feature": {
"Id": "string",
"Name": "string",
"Description": "string",
"DefaultState": 0
},
"CurrentState": 0
}
],
"ExternalAccountId": "string",
"TenantType": "string"
}
RegionBase
Represents a region within an environment for customers to see.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | Gets or sets the identifier. |
| Name | string | false | true | Gets or sets the name. |
| AdministrativeEndpointsWritable | boolean | false | false | Gets or sets a value indicating whether administrative endpoints are writable in a region. |
| BaseAddress | string | false | true | Gets or sets the base address. |
{
"Id": "string",
"Name": "string",
"AdministrativeEndpointsWritable": true,
"BaseAddress": "string"
}