Home > @cerbos/core > Client > getPolicies
Fetch multiple policies by ID.
Signature:
getPolicies(request: GetPoliciesRequest, options?: RequestOptions): Promise<GetPoliciesResponse>;
Parameter |
Type |
Description |
---|---|---|
request | ||
options |
(Optional) |
Returns:
Promise<GetPoliciesResponse>
Requires
-
the client to be configured with Options.adminCredentials, and
-
the Cerbos policy decision point server to be configured with the admin API enabled.
const policies = await cerbos.getPolicies({
ids: ["resource.document.v1", "resource.image.v1"],
});