Fetch the effective Policy Bundle for the user
Fetch the effective Policy Bundle for the user
client.policyBundle.retrieve(PolicyBundleRetrieveParams { ifNoneMatch, xClientRequestID } params?, RequestOptionsoptions?): Response
GET/policy/bundle
Returns the effective Policy Bundle for the user identified by the zone-issued resource-scoped token. When no user-scope binding exists, one will be generated from the default set.
The response body is a binary archive in the codec selected via the
Accept header. The only codec supported today is
application/vnd.keycard.policy-bundle.v1+tar+gzip. Clients SHOULD send
an explicit Accept header; absent one, the server defaults to the
tar+gzip codec.
Supports conditional fetch via If-None-Match: when the supplied ETag
matches the current bundle, the server responds 304 Not Modified with
no body.
Parameters
Returns
unnamed_schema_0 = Response
Fetch the effective Policy Bundle for the user
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI({
apiKey: process.env['KEYCARD_API_API_KEY'], // This is the default and can be omitted
});
const policyBundle = await client.policyBundle.retrieve();
console.log(policyBundle);
const content = await policyBundle.blob();
console.log(content);