Skip to main content
Version: 2.0.0

Bulk Check

To perform bulk permission checks, the permit.BulkCheck function can be leveraged. This allows you to validate multiple permission requests in a single call.

Basic Usage

The permit.BulkCheck function accepts an array of individual check requests as input:

const { Permit } = require("permitio");

const permit = new Permit({token: "<YOUR_API_KEY>", ...});
await permit.bulkCheck([
{ user: "", action: 'read', resource: "document" },
{ user: "", action: 'create', resource: "document" },

Please note that the "Bulk Check" feature might have degraded performance if you're checking permissions for different tenants. This is because we split the requests by tenant in order for the request to reach the relevant PDP instance. This is done for it to be compatible with the current PDP Sharding setup, in which that instance only contains data for a few tenants, not all of them.