https://authzed.com logo
Title
e

erickhgm

01/31/2023, 1:49 AM
Where can I find the documentation about REST API, more specific, how filters I can use in: http://localhost:8443/v1/relationships/read
I would like something like this, get all users with a direct relation with a resource. Doesn't matter the role/permission. Example:
which users have access to resource:1
as for which users have access directly OR indirectly
e

erickhgm

01/31/2023, 2:04 AM
Can I just translate this to JSON? **From**:
message RelationshipFilter {
    string resource_type = 1;
    string optional_resource_id = 2;
    string optional_relation = 3;
    SubjectFilter optional_subject_filter = 4;
}
**To**:
{
  "consistency": {
    "minimizeLatency": true
  },
  "relationshipFilter": {
    "resourceType": "document",
    "optionalResourceId": "",
    "optionalRelation": ""
  }
}
j

Joey

01/31/2023, 2:04 AM
more or less, yes
I don't recall if it is
resourceType
or
resource_type
though
so you might need to try both
e

erickhgm

01/31/2023, 2:05 AM
ok, no problem
Thank you @Joey !
v

vroldanbet

01/31/2023, 10:38 AM
There should exists a Postman Workspace with examples for all APIs. @Sam do you have a link handy?
d

dsieczko

01/31/2023, 10:48 AM
Yes it’s in Postman - we’ll be exposing this better in our docs soon too @erickhgm - sorry for the trouble
e

erickhgm

01/31/2023, 12:13 PM
Yeah ... The picture that I sent was from this postman collection. I asked because in the example we don't have all the filters
v

vroldanbet

01/31/2023, 12:15 PM
oh woops, didn't realize that was postman, sorry!
d

dsieczko

01/31/2023, 12:21 PM
Ah - thanks @erickhgm - we’ll get them in there. Were you able to use them ok following Joey’s pointers?
e

erickhgm

01/31/2023, 12:24 PM
I haven't tried it yet, I'm just finishing reading the documentation https://openfga.dev/docs first
But I will try ...
d

dsieczko

01/31/2023, 4:26 PM
Cool - let us know if you need help @erickhgm
s

Sam

01/31/2023, 5:10 PM
e

erickhgm

01/31/2023, 5:43 PM
Great!