Skip to main content

Resource

A resource is a single instance of a resource type and is used by the Permissions Space Block to track and calculate permissions for this item.

Each resource that you need to be tracked needs to be added to the Permissions Space Block as a resource under a tenant. There is no need to add the full resource with all its properties. All you need to define is the resource type and the unique ID of the resource.

Common examples for resources are:

  • Resource with ID 123 of Resource Type folder
  • Resource with ID 456 of Resource Type file
  • Resource with ID 789 of Resource Type invoice

Manage resources

The Resource API is used to manage resources under a tenant.

curl -i --location "https://<YOUR_API_URL>/management/tenants/<TENANT_ID>/resources/<RESOURCE_TYPE_ID>" \
--request POST \
--header "Content-Type: application/json" \
--header "Authentication: Bearer <YOUR_ACCESS_TOKEN>" \
--header "apiKey: <YOUR_API_KEY>"
--data '{
"id": "<RESOURCE_ID>",
"name": "<RESOURCE_NAME>"
}'