SpaceBlocks.Permissions.WebServices.Main.Api Management (v1)
Download OpenAPI specification:Download
This is the management API.
Create a new member-group
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant where the member group belongs to |
Request Body schema: required
The create member-group request
| id | string |
| name | string |
| subjectIds | Array of strings unique |
Responses
Request samples
- Payload
Response samples
- 201
- 401
Check if the subject has the requested sub-level permissions on the requested resource.
Authorizations:
query Parameters
| tenantId | string The ID of the tenant |
| resourceTypeId | string The resource type ID |
| resourceId | string The ID of the resource to check permissions on |
| subjectId | string The ID of the subject to check permissions for |
| permissionScope | string The ID of the resource type on which the permission to check is defined |
| permission | Array of strings unique The permission slug to check (can occur multiple times) |
Responses
Response samples
- 200
- 401
Get the permissions of the subject on the requested resource.
Authorizations:
query Parameters
| tenantId | string The ID of the tenant |
| resourceTypeId | string The resource type ID |
| resourceId | string The ID of the resource to check permissions on |
| subjectId | string The ID of the subject to check permissions for |
Responses
Response samples
- 200
- 401
Update a resource
This triggers a recalculation of the permission tree.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant where the resource belongs to |
| resourceTypeId required | string The key to the corresponding permission-level of the resource |
| id required | string The ID of the resource |
Request Body schema: required
The UpdateResourceRequest DTO
object (UpdateResourceParent) | |
| isInheritanceDisabled | boolean |
Responses
Request samples
- Payload
Response samples
- 400
- 401
Delete a resource.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant where the resource belongs to |
| resourceTypeId required | string The key to the corresponding permission-level of the resource |
| id required | string The ID of the deleted resource |
Responses
Response samples
- 400
- 401
Create a new resource.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant whom the resource belongs |
| resourceTypeId required | string The key of the permission level |
Request Body schema: required
The create resource request
| id | string |
object (CreateResourceParent) | |
object (ResourceMembers) | |
| isInheritanceDisabled | boolean |
Responses
Request samples
- Payload
Response samples
- 201
- 400
- 401
Get all resources within the given tenantId where the subject has the requested permissions.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant |
| resourceTypeId required | string The key to the corresponding permission-level of the resource |
query Parameters
| subjectId | string The ID of the subject |
| permissionScope | string The slug of the resource type on which the permission to check is defined |
| permission | Array of strings unique The permission slug to check (can occur multiple times) |
Responses
Response samples
- 200
- 401
Patch resource members
Upsert all members of an existing resource on a specific role in a PATCH bulk operation. An existing member gets their role updated; a new member gets the role assigned on the resource. This triggers a recalculation of the permission tree.
Authorizations:
path Parameters
| tenantId required | string The tenantId |
| resourceTypeId required | string The resourceTypeId |
| id required | string The resourceId |
Request Body schema: required
the UpsertMemberRequest object
object or null | |
object or null |
Responses
Request samples
- Payload
Response samples
- 200
- 401
- 404
Get all resources within the given tenantId where the subject has the requested permissions.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant |
| resourceTypeId required | string The key to the corresponding permission-level of the resource |
query Parameters
| subjectId | string The ID of the subject |
| permissionScope | string The slug of the resource type on which the permission to check is defined |
| permission | Array of strings unique The permission slug to check (can occur multiple times) |
Responses
Response samples
- 200
- 401
Create a new role for a specific tenant
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant where the role should be created in. |
Request Body schema: required
The create role request
| id | string or null |
| name | string |
| description | string |
object |
Responses
Request samples
- Payload
Response samples
- 201
- 400
- 401
- 409
Update a role
This triggers a recalculation of the permission tree.
Authorizations:
path Parameters
| tenantId required | string The ID of the tenant that the role belongs to |
| id required | string The ID of the role to update |
Request Body schema: required
The updateRoleRequest DTO
object or null | |
| name | string or null |
| description | string or null |
Responses
Request samples
- Payload
Response samples
- 200
- 401
- 404
Returns all tenants in the database. If subjectId is provided, only tenants that the subject has access to will be returned.
Authorizations:
query Parameters
| subjectId | string The ID of the subject to check for access to the tenants (optional) |
| permissionScope | string The slug of the resource type on which the permission to check is defined (only required, if subjectId is passed) |
| permission | Array of strings unique The permission slug to check (optional; can occur multiple times - empty means no permissions are required) |
Responses
Response samples
- 200
- 401
Check if the subject has the requested sub-level permissions on the requested resource.
Authorizations:
path Parameters
| id required | string The ID of the tenant |
query Parameters
| subjectId | string The ID of the subject to check permissions for |
| permissionScope | string The slug of the resource type on which the permission to check is defined |
| permission | Array of strings unique The permission slug to check (can occur multiple times) |
Responses
Response samples
- 200
- 401
Get all tenant ids where the subject has the requested permissions.
Authorizations:
query Parameters
| subjectId | string The ID of the subject |
| permissionScope | string The slug of the resource type on which the permission to check is defined |
| permission | Array of strings unique The permission slug to check (can occur multiple times) |
Responses
Response samples
- 200
- 401