Access Control
- Last UpdatedFeb 27, 2024
- 5 minute read
This portion of the overall data views API focuses on securing data views by setting their ownership and permissions.
List Data Views Access Rights
Returns the access rights to the data views collection for the calling user or client.
Request
GET /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/accessrights/dataviews
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | A list of access rights to the data views collection. |
| 403 | ErrorResponse | You are not authorized to view the requested data view collection's access control list. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Example response body
200 Response
HTTP 200 OK
[
"Read",
"Write",
"Delete",
"ManageAccessControl"
]
403 Response (ErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
Access Control
This portion of the overall data views API focuses on securing data views by setting their ownership and permissions.
Get Data Views Access Control List
Returns the default AccessControlList for the DataViews collection.
Request
GET /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/accesscontrol/dataviews
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AccessControlList | The default access control list of the data views collection. |
| 403 | ErrorResponse | You are not authorized to view the requested data view collection's access control list. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Example response body
200 Response
HTTP 200 OK
{
"RoleTrusteeAccessControlEntries":
[
{
"Trustee": {
"Type": Role,
"RoleId": "11111111-1111-1111-1111-111111111111"
},
"AccessType": Allowed,
"AccessRights": 1
},
{
"Trustee": {
"Type": Role,
"RoleId": "22222222-2222-2222-2222-222222222222"
},
"AccessType": Allowed,
"AccessRights": 15
},
{
"Trustee": {
"Type": User,
"RoleId": "33333333-3333-3333-3333-333333333333"
},
"AccessType": Denied,
"AccessRights": 8
}
]
}
403 Response (ErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
Update Data Views Access Control List
Updates the default AccessControlList for the DataViews collection.
Request
PUT /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/accesscontrol/dataviews
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
Request Body
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Successfully updated the default access control list of the data views collection. |
| 400 | string | The request is not valid. See the response body for details. |
| 403 | string | You are not authorized to update the data views collection's default access control list. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Access Control
This portion of the overall data views API focuses on securing data views by setting their ownership and permissions.
Get Data View Access Control List
Returns the AccessControlList of the specified data view.
Request
GET /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/accesscontrol
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string id
Data view identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AccessControlList | The access control list of the requested data view. |
| 403 | ErrorResponse | You are not authorized to view the requested data view's access control list. |
| 404 | ErrorResponse | The requested data view was not found. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Example response body
200 Response
HTTP 200 OK
{
"RoleTrusteeAccessControlEntries":
[
{
"Trustee": {
"Type": Role,
"RoleId": "11111111-1111-1111-1111-111111111111"
},
"AccessType": Allowed,
"AccessRights": 1
},
{
"Trustee": {
"Type": Role,
"RoleId": "22222222-2222-2222-2222-222222222222"
},
"AccessType": Allowed,
"AccessRights": 15
},
{
"Trustee": {
"Type": User,
"RoleId": "33333333-3333-3333-3333-333333333333"
},
"AccessType": Denied,
"AccessRights": 8
}
]
}
403 Response (ErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
Update Data View Access Control List
Updates the AccessControlList of the specified data view.
Request
PUT /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/accesscontrol
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string id
Data view identifier.
Request Body
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Successfully updated the data view access control list. |
| 400 | ErrorResponse | The request is not valid. See the response body for details. |
| 403 | ErrorResponse | You are not authorized to update the requested data view's access control list. |
| 404 | ErrorResponse | The requested data view was not found. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Get Data View Owner
Returns the owner Trustee of the specified data view.
Request
GET /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/owner
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string id
Data view identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Trustee | The owner of the requested data view. |
| 403 | ErrorResponse | You are not authorized to view the requested data view's owner. |
| 404 | ErrorResponse | The requested data view was not found. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Example response body
200 Response
{
"Type": User,
"TenantId": "55555555-5555-5555-5555-555555555555",
"ObjectId": "44444444-4444-4444-4444-444444444444"
}
403 Response (ErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
Update Data View Owner
Updates the owner Trustee of the specified data view.
Request
PUT /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/owner
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string id
Data view identifier.
Request Body
A Trustee.
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Successfully updated the data view owner. |
| 400 | ErrorResponse | The request is not valid. See the response body for details. |
| 403 | ErrorResponse | You are not authorized to update the requested data view's owner. |
| 404 | ErrorResponse | The requested data view was not found. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
List Data View Access Rights
Returns the access rights to the requested data view for the calling user or client.
Request
GET /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/accessrights
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string id
Data view identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | A list of access rights to the requested data view. |
| 403 | ErrorResponse | You are not authorized for this operation. |
| 404 | ErrorResponse | The requested data view was not found. |
| 500 | ErrorResponse | An error occurred while processing the request. See the response body for details. |
Example response body
200 Response
HTTP 200 OK
[
"Read",
"Write",
"Delete",
"ManageAccessControl"
]
403 Response (ErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
Definitions
ErrorResponse
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | None |
| Error | string | false | true | None |
| Reason | string | false | true | None |
| Resolution | string | false | true | None |
| Parameters | object | false | true | None |
| ChildErrors | object | false | true | None |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
},
"ChildErrors": {
"property1": null,
"property2": null
}
}
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 |