Skip to main content

SpaceBlocks.Permissions.WebServices.Main.Api Public (v1)

Download OpenAPI specification:Download

This is the public API.

Resource

GetResourceMembers

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string
resourceId
required
string

Responses

Response samples

Content type
No sample

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.

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string

The resourceTypeId

resourceId
required
string

The resourceId

Request Body schema:

the UpsertMemberRequest object

object or null
object or null

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

Stop subjects from accessing a specific resource.

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string

The resourceTypeId

resourceId
required
string

The resourceId

Request Body schema:

the DeleteMemberRequest object

subjectIds
Array of strings unique

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

Get all resources within the given tenantId where the subject has the requested permissions.

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string

The key to the corresponding permission-level of the resource

query Parameters
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

Content type
No sample

GetResourcePermissions

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string
resourceId
required
string

Responses

Response samples

Content type
No sample

Get the permissions of the subject on the requested resource.

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string

The ID of the resource type

resourceId
required
string

The ID of the resource

subjectId
required
string

The ID of the subject to check permissions for

Responses

Response samples

Content type
No sample

Check if the subject has the requested sub-level permissions on the requested resource.

Authorizations:
Bearer
path Parameters
resourceTypeId
required
string

The ID of the resource type

resourceId
required
string

The ID of the resource

subjectId
required
string

The ID of the subject for which the permissions should be checked

query Parameters
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

Content type
No sample

Role

Create a new role within the tenant

Authorizations:
Bearer
Request Body schema:

The create role request

id
string
name
string
description
string or null
object

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

Get all roles of a tenant

Authorizations:
Bearer

Responses

Response samples

Content type
No sample

Get a role by id

Authorizations:
Bearer
path Parameters
id
required
string

The ID of the role

Responses

Response samples

Content type
No sample

Update a role

This triggers a recalculation of the permission tree.

Authorizations:
Bearer
path Parameters
id
required
string

The ID of the role to update

Request Body schema:

The updateRoleRequest DTO

name
string or null
description
string or null
object or null

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

Delete a role

This triggers a recalculation of the permission tree.

Authorizations:
Bearer
path Parameters
id
required
string

The ID of the role to delete

Responses

Response samples

Content type
No sample

Tenant

GetTenantMembers

Authorizations:
Bearer

Responses

Response samples

Content type
No sample

Upsert Tenant 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:
Bearer
Request Body schema:

the UpsertMemberRequest object

object or null
object or null

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

Stop subjects from accessing a specific resource.

This triggers a recalculation of the permission tree.

Authorizations:
Bearer
Request Body schema:

the DeleteMemberRequest object

subjectIds
Array of strings unique

Responses

Request samples

Content type
No sample

Response samples

Content type
No sample

GetTenantPermissions

Authorizations:
Bearer

Responses

Response samples

Content type
No sample

Get the permissions of the subject on the requested resource.

Authorizations:
Bearer
path Parameters
subjectId
required
string

The ID of the subject to check permissions for

Responses

Response samples

Content type
No sample

Check if the subject has the requested sub-level permissions on the requested resource.

Authorizations:
Bearer
path Parameters
subjectId
required
string

The ID of the subject for which the permissions should be checked

query Parameters
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

Content type
No sample