Skip to main content
Version: 2.0.0

list

List resource instances defined within the environment.

Parameters

tenant (optional) - The tenant key or id to filter by
relation (optional) - The relation id or key to filter by
subject (optional) - The subject to filter by, accepts either the resource instance id or resource_type:resource_instance
subjectType (optional) - The subject type to filter by, accepts resource type id or key
object (optional) - The object to filter by, accepts either the resource instance id or resource_type:resource_instance
objectType (optional) - The object type to filter by, accepts resource type id or key
page (optional) - The page number of the results to fetch, starting at page 1
perPage (optional) - The number of results per page (maximum of 100)

Implementation

await permit.api.relationshipTuples.list({
tenant: "default",
relation: "parent",
subject: "file:file-1",
subjectType: "file",
object: "folder:folder-1",
objectType: "folder",
page: 1,
perPage: 20,
});