How do I check for a permission using the HTTP API...
# talk-keto
a
How do I check for a permission using the HTTP API? Maybe I'm misinterpreting it, but it seems like it only allows checking relations? Also whats the naming convention for relations? Ive seen both singular and plural in the docs (member vs members). Or are the plurals whatever is defined in
related
and the singulars whatever is in
permits
with both being relations accepted by the REST API?
s
Internally relations and permissions are the same thing, but we will refactor some of that. Just use the permission as the relation in the tuple.
For naming conventions, we are a bit behind on updating all of that.
a
What happens when I create a relation tuple with the name of a permission function?
s
Then the permission is allowed for the subject
Not sure if that is a feature or bug
But for now that's how we planned it to be
a
That sounds more or less like the expected behavior but could lead to confusing situations. Im abstracting the Keto API in my application though so that shouldnt happen
@steep-lamp-91158 Expanding on that, is any kind of validation of created relations against the OPL document planned or possible? As in the API returning an error if someone attempts creating a relation that is nonexistent or uses differing types?
s
planned, but not yet implemented