Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Read API documentation #971

Open
lupeterm opened this issue Feb 25, 2025 · 0 comments
Open

Extend Read API documentation #971

lupeterm opened this issue Feb 25, 2025 · 0 comments

Comments

@lupeterm
Copy link
Contributor

Hi,
considering the use case that an object is deleted, one would probably want to delete all relationship tuples of said object.

As i said in a forum post here, the read API documentation is a little "misleading" in the sense that I originally assumed that the --relation flag is mandatory, which it isn't.

I would suggest adding a fourth example detailing that one can simply read all tuples for an object without specifying its relation nor user.
e.g.

fga tuple read --api-url=${FGA_API_URL} --store-id=${FGA_STORE_ID}  --object document:planning 

{
  "continuation_token":"",
  "tuples": [
    {
      "key": {
        "object":"document:planning",
        "relation":"viewer",
        "user":"user:bob"
      },
      "timestamp":"2025-02-25T11:39:41.626041502Z"
    },
    {
      "key": {
        "object":"document:planning",
        "relation":"owner",
        "user":"user:tom"
      },
      "timestamp":"2025-02-25T11:39:41.890193162Z"
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant