# Retrieve a credential policy

`GET https://api.cademi.com.br/api/v3/credentials/{credential_id}/policies/{policy_id}`

Operation ID: `credentials.policies.get` · API v3

Retrieves a policy from the credential's active policy revision.

Policies that are no longer part of the active revision, or that belong to a different credential, return `404 Not Found`.

The response includes an `ETag` representing the credential's current revision. Send this value in the `If-Match` header when updating the policy to avoid overwriting a newer version.

Required permissions: `credentials.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `credential_id` | path | string | yes |  |
| `policy_id` | path | string | yes |  |

## Responses

### 200

Returns the requested policy.

Body: `data`: Policy.

Fields of Policy:

| Field | Type | Required | Description |
|---|---|---|---|
| `capabilities` | array of string | yes |  |
| `id` | string | yes |  |
| `object` | string, one of `policy` | yes |  |
| `published_at` | string or null (date-time) | yes |  |
| `published_by` | object | yes |  |
| `resources` | array of object | yes |  |
| `version` | integer | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The credential or policy was not found, the policy is not part of the credential's active policy revision, or the resource is not accessible with the current credentials.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
