Hi, I created a test SpiceDB instance an populated...
# spicedb
a
Hi, I created a test SpiceDB instance an populated it with the following schema :
Copy code
definition user {}

definition organisation {
    relation owner: user
    relation manager: user
    relation user: user
    permission write = owner + manager
    permission read = owner + manager + user
}

definition workspace {
    relation parent: organisation
    permission write = parent->write
    permission read = parent->read
}

definition scene {
    relation parent: workspace
    permission write = parent->write
    permission read = parent->read
}
I defined the following relations :
Copy code
organisation:org1#owner@user:bob
workspace:ws1#parent@organisation:org1
scene:sc1#parent@workspace:ws1
I'm trying to send a query that would return all the
scene
bob
has access to. I've tried so send the following request :
Copy code
curl -X 'POST' \
  'http://localhost:8443/v1/permissions/resources' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer somerandomkeyhere' \
  -d '{
  "consistency": {
    "minimizeLatency": true
  },
  "resourceObjectType": "scene",
  "permission": "read",
  "subject": {
    "object": {
      "objectType": "user",
      "objectId": "bob"
    }
  }
}'
but it doesn't return me anything. Is there a way to achieve what I'm trying to do? Thanks 🙂