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 Typefolder
- Resource with ID
456
of Resource Typefile
- Resource with ID
789
of Resource Typeinvoice
Manage resources
- API
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>"
}'