Community Tenants
- Last UpdatedJan 20, 2023
- 6 minute read
APIs for retrieving, updating and removing community tenant information
Update Community Tenant Info
Updates the state of a community tenant. The state can be activated or paused. Also it updates preferred region id and contact email.
Request
PUT /api/v1-preview/communities/{communityId}/tenants/{tenantId}
Parameters
string communityId
Community identifier.string tenantId
Tenant identifier of the CommunityTenant in the community to update.
Request Body
UpdateCommunityTenantInput object that contains the attributes to use for the update.
{
"Status": "None",
"PreferredRegionId": "string",
"ContactEmail": "user@example.com",
"CommunityAlias": "string"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | Success. The community tenant was updated. |
| 204 | None | No Content. No operation was performed. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Patch Community Tenant Info
Updates the community tenant using an RFC 7396 compliant Patch operation.
Request
PATCH /api/v1-preview/communities/{communityId}/tenants/{tenantId}
Parameters
string communityId
Community identifier.string tenantId
Tenant identifier of the CommunityTenant in the community to update.
Request Body
A dictionary that contains attributes found in UpdateCommunityTenantInput for a community tenant update.
{
"property1": "string",
"property2": "string"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | Success. The community tenant was updated. |
| 204 | None | No Content. No operation was performed. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Remove a Community Tenant from a Community
Removes a community tenant from a community
Request
DELETE /api/v1-preview/communities/{communityId}/tenants/{tenantId}
Parameters
string communityId
Community identifier.string tenantId
Tenant identifier of the CommunityTenant in the community to remove.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | None |
| 400 | ErrorResponse | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it does not know how to handle. |
Get Community Tenant Access Rights
Get the effective access rights for a community tenant resource.
Request
GET /api/v1-preview/communities/{communityId}/tenants/{tenantId}/accessrights
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | An enumerable of all allowed Access Rights for a CommunityTenant resource. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
Get Community Tenant Access Control List
Get the access control list for a community tenant resource.
Request
GET /api/v1-preview/communities/{communityId}/tenants/{tenantId}/accesscontrol
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | The AccessControlList of a CommunityTenant resource. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
Update Community Tenant Access Control List
Update the access control list for a community tenant resource.
Request
PUT /api/v1-preview/communities/{communityId}/tenants/{tenantId}/accesscontrol
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Request Body
The new access control list to update the current entry with.
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Success. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
Get Community Tenant Owner
Get the resource owner for a community tenant resource.
Request
GET /api/v1-preview/communities/{communityId}/tenants/{tenantId}/owner
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | The ResourceOwner of a Community resource or empty 200 if no ResourceOwner found. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
Update Community Tenant Owner
Update the resource owner for a community tenant resource.
Request
PUT /api/v1-preview/communities/{communityId}/tenants/{tenantId}/owner
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Request Body
Input trustee.
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Success. Community Resource Owner is updated. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
List Community Tenant Extended Access Rights
Get the extended effective access rights for a community tenant resource.
Request
GET /api/v1-preview/communities/{communityId}/tenants/{tenantId}/extendedaccessrights
Parameters
string communityId
Community identifier.string tenantId
The requested tenant identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | CommunityAccessRights[] | An enumerable of all allowed Access Rights for an administrative CommunityTenant resource. |
| 400 | ErrorResponse | Bad Request. The server could not understand the request. |
| 401 | ErrorResponse | Unauthorized. The client has not been authenticated. |
| 403 | ErrorResponse | Forbidden. The client does not have the required permissions to make the request. |
| 404 | ErrorResponse | Not Found. The requested community tenant was not found. |
| 500 | ErrorResponse | Internal Server Error. The server has encountered a situation it doesn't know how to handle. |
Example response body
200 Response (CommunityAccessRights[])
[
0
]
Definitions
ErrorResponse
Object returned whenever there is an error
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | true | false | Operation identifier of action that caused the error |
| Error | string | true | false | Error description |
| Reason | string | true | false | Reason for the error |
| Resolution | string | true | false | Resolution to resolve the error |
| DynamicProperties | object | false | true | Additional properties |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"DynamicProperties": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
UpdateCommunityTenantInput
The UpdateCommunityTenantInput object
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Status | CommunityTenantStatus | false | true | New status of CommunityTenant in community |
| PreferredRegionId | string | false | true | Change the preferred Region Id to override the community Preferred Region Id |
| ContactEmail | false | true | Contact email of a community tenant. It serves as a point of contact for community tenants. | |
| CommunityAlias | string | false | true | Change the community alias for community tenant. |
{
"Status": "None",
"PreferredRegionId": "string",
"ContactEmail": "user@example.com",
"CommunityAlias": "string"
}
CommunityTenantStatus
Represents a status of a community tenant.
Enumerated Values
| Property | Value | Description |
|---|---|---|
| None | None | undefined |
| Paused | Paused | undefined |
| Active | Active | undefined |
AccessControlList
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| RoleTrusteeAccessControlEntries | [AccessControlEntry] | false | true | None |
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
AccessControlEntry
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Trustee | Trustee | false | true | None |
| AccessType | AccessType | false | false | None |
| AccessRights | int64 | false | false | None |
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
Trustee
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Type | TrusteeType | false | false | None |
| ObjectId | string | false | true | None |
| TenantId | string | false | true | None |
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
TrusteeType
Enumerated Values
| Property | Value |
|---|---|
| User | 1 |
| Client | 2 |
| Role | 3 |
AccessType
Enumerated Values
| Property | Value |
|---|---|
| Allowed | 0 |
| Denied | 1 |
CommunityAccessRights
Access rights for operations against Communities.
Enumerated Values
| Property | Value |
|---|---|
| None | 0 |
| ViewCommunityDetails | 1 |
| LeaveCommunity | 2 |
| ManageUsers | 4 |
| PauseData | 8 |
| EditCommunityAlias | 16 |
| EditCommunityProfile | 32 |
| DeleteCommunity | 64 |
| ManageTenants | 128 |
| ManageCommunityAdministrators | 256 |
| UpdateRegion | 512 |
| UpdateContactEmail | 1024 |