permify icon indicating copy to clipboard operation
permify copied to clipboard

Add Support for Batch Processing in permission-check API

Open ucatbas opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. This is an enhancement request to the permission-check API. The current implementation processes a single entity and subject per API call. It would be beneficial to introduce support for batch processing, allowing users to send arrays of entities or subjects and receive results as arrays in a single API call.

Additional context

  • reduces the number of API calls needed for multiple permission checks, improving performance and reducing network overhead.

ucatbas avatar Aug 27 '24 10:08 ucatbas

Here is an example request body:

{
    "metadata": {
        "snap_token": {{snap_token}},
        "schema_version": {{schema_version}},
        "depth": 100
    },
    "entity": {
        "type": "repository",
        "ids": ["repo_1", "repo_2", "repo_3"]
    },
    "permission": "view",
    "subject": {
        "type": "user",
        "ids": ["user_1"]
    }
}

ucatbas avatar Aug 27 '24 10:08 ucatbas