average-airport-82192
08/19/2022, 5:38 PM> keto expand view facilities facility-43
neither flag --read-remote nor env var KETO_READ_REMOTE are set, falling back to 127.0.0.1:4466
∪ facilities:facility-43#view
├─ ∪ groups:group-43#member
│ ├─ ☘ user-43️
while the REST API seems to not understand my namespace:
> curl -X GET -H 'Accept: application/json' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' -H 'Content-Type: application/json' -H 'User-Agent: python-requests/2.27.1' -d '{"namespace": "facilities", "object": "facility-43", "relation": "view"}' <http://localhost:4466/relation-tuples/expand>
{"error":{"code":404,"status":"Not Found","reason":"Unknown namespace with name \"\".","message":"The requested resource could not be found"}}
and there is a namespace there:
> psql keto -c 'select distinct namespace from keto_relation_tuples'
namespace
------------
facilities
groups
(2 rows)
red-machine-69654
08/19/2022, 5:51 PMred-machine-69654
08/19/2022, 5:52 PM-d namespace=facilities&so=on
average-airport-82192
08/19/2022, 5:55 PM> curl -X GET -H 'Accept: application/json' '<http://localhost:4466/relation-tuples/expand?namespace=facilities&object=facility-43&relation=view>'
{"type":"union","children":[{"type":"union","children":[{"type":"leaf","subject_id":"user-43"}],"subject_set":{"namespace":"groups","object":"group-43","relation":"member"}}],"subject_set":{"namespace":"facilities","object":"facility-43","relation":"view"}}
Thanks, Interesting that it breaks on this one but not on other endpoints i.e. I can PUT and DELETE with a JSON body but not make a GET
Which I admit is odd, but is allowed by the spec: https://stackoverflow.com/questions/978061/http-get-with-request-bodyred-machine-69654
08/19/2022, 8:20 PMnarrow-van-43826
08/23/2022, 8:10 AM