## Retrieve

`client.policyBundle.retrieve(PolicyBundleRetrieveParamsparams?, 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

- `params: PolicyBundleRetrieveParams`

  - `ifNoneMatch?: string`

    Conditional fetch ETag. If the supplied value matches the current
    bundle ETag, the server returns `304 Not Modified` with no body.

  - `xClientRequestID?: string`

    Unique request identifier specified by the originating caller and passed along by proxies.

### Returns

- `unnamed_schema_0 = Response`

### Example

```typescript
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);
```
