Allow API to crawl data without IDs #191
Closed
geoffroybraun
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Thanks @geoffroybraun for the feedback! This is related to this openfga/roadmap#33, it's something we want to do but haven't scheduled it yet. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
Recently, we had an ubiquitous language update which forced us to make our authorization model evolve. Nothing difficult so far. But this also forces us to migrate our data, changing from one type to another. Unfortunately, the API does not allow to crawl data without providing IDs.
The idea here is to be able to call the
read
enpoint (/stores/{store_id}/read) without providing IDs (we would still be able to provide bothpage_size
andcontinuation_token
if required).Here's an example of such a call:
The fact that we do not provide a
user
ID nor adocument
one would mean we want to look for ALL relations involving users having areader
relation with any document.The response would still be the same format:
The response above shows that we have 2 users (John and Jane) having relations with 3 documents 2021-budget, 2022-budget and 2023-budget. I don't have any opinion on how data should ordered before being returned, the current logic can remain the same.
I am aware that this may have an impact on OpenFga performances, but without such a behavior, we would not be able to update our data without directly querying the database (which is definitely something we do not want to do).
Please let me know if you need further information, cheers!
Beta Was this translation helpful? Give feedback.
All reactions