#Retrieve resources based on attribute
1 messages · Page 1 of 1 (latest)
You can retrieve resources with data filtering apis, but Im not sure its a good fit for your use case: https://docs.permify.co/docs/api-overview/permission/lookup-entity/
Lookup Entity endpoint lets you ask questions in form of “Which resources can user:X do action Y?”. As a response of this you’ll get a entity results in a format of string array or as a streaming response depending on the endpoint you're using.
I willl try to be clear in my question: I would like to combine authorization with SQL criteria in my database. For example, I would like to retrive a only database entities that my user has authorization and sorted by name, for example. In a advance query, i would like to retrieve database entities that my user has authorization and filter by a Where rules .. a API filter. Could I be clear?
@errant reef
Thanks for sharing the details. For the first example, you can retrieve entities that a specific subject has access to by using the endpoint I provided above: https://docs.permify.co/docs/api-overview/permission/lookup-entity/.
For the second example we do not have such functionality right now, but since we return entity IDs within the entity filtering endpoints, perhaps an SQL query could be added on top of that operation to fulfill this need
Lookup Entity endpoint lets you ask questions in form of “Which resources can user:X do action Y?”. As a response of this you’ll get a entity results in a format of string array or as a streaming response depending on the endpoint you're using.