List objects a user is related to
The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To arrive at a result, the API uses:
- An authorization model
- Explicit tuples written through the Write API
- Contextual tuples present in the request
- Implicit tuples that exist by virtue of applying set theory. For example:
document:2021-budget#viewer@document:2021-budget#viewer
In the example the set of users who are viewers of document:2021-budget are the set of users who are the viewers of document:2021-budget.
An authorization_model_id may be specified in the body. If it is not specified, the latest authorization model ID is used.
Note: We recommend you specify authorization model ID for better performance.
You may also specify contextual_tuples that is treated as regular tuples. Each of these tuples may have an associated condition.
You may also provide a context object that is used to evaluate the conditioned tuples in the system.
Note: We recommend you provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly.
By default, the Check API caches results for a short time to optimize performance. You may specify a value of HIGHER_CONSISTENCY for the optional consistency parameter in the body to inform the server that higher conisistency is preferred at the expense of increased latency. Consideration should be given to the increased latency if requesting higher consistency.
The response contains the related objects in an array in the “objects” field of the response and are strings in the object format <type>:<id> (e.g. “document:roadmap”).
The number of objects in the response array are limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.
The objects given are not sorted, and therefore two identical calls can give a given different set of objects.
Path Parameters
Body
"reader"
"document"
1 - 512"user:anne"
"01G5JAVJ41T49E9TT3SKVS7X1J"
Controls the consistency preference for this request. Default value is UNSPECIFIED, which has the same behavior as MINIMIZE_LATENCY.
UNSPECIFIED, MINIMIZE_LATENCY, HIGHER_CONSISTENCY "MINIMIZE_LATENCY"
Additional request context that are used to evaluate any ABAC conditions encountered in the query evaluation.
Response
A successful response.