Where can I find the documentation about REST API,...
# spicedb
e
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
Can I just translate this to JSON? **From**:
Copy code
message RelationshipFilter {
    string resource_type = 1;
    string optional_resource_id = 2;
    string optional_relation = 3;
    SubjectFilter optional_subject_filter = 4;
}
**To**:
Copy code
{
  "consistency": {
    "minimizeLatency": true
  },
  "relationshipFilter": {
    "resourceType": "document",
    "optionalResourceId": "",
    "optionalRelation": ""
  }
}
j
more or less, yes
I don't recall if it is
resourceType
or
resource_type
though
so you might need to try both
e
ok, no problem
Thank you @Joey !
v
There should exists a Postman Workspace with examples for all APIs. @Sam do you have a link handy?
d
Yes it’s in Postman - we’ll be exposing this better in our docs soon too @erickhgm - sorry for the trouble
e
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
oh woops, didn't realize that was postman, sorry!
d
Ah - thanks @erickhgm - we’ll get them in there. Were you able to use them ok following Joey’s pointers?
e
I haven't tried it yet, I'm just finishing reading the documentation https://openfga.dev/docs first
But I will try ...
d
Cool - let us know if you need help @erickhgm
s
e
Great!