---
title: "Get a Policy Check"
method: GET
path: "/policy-checks/{policy_check}"
tags: ["policy-checks"]
---

# Get a Policy Check

`GET /policy-checks/{policy_check}`

## Request

- Base URL: `https://example.scalr.io/api/iacp/v3`
- URL: `https://example.scalr.io/api/iacp/v3/policy-checks/{policy_check}`
- Auth: HTTP bearer

Show details of a specific Terraform policy check stage.

## Path parameters

- `policy_check` string, required

## Response `200`

Success.

- PolicyCheckDocument: JSON:API Document. see: https://jsonapi.org/format/#document-structure
  - `data` PolicyCheck: A policy check contains the details of the policy check phase of a run in Scalr. Policy check is performed immediately after Terraform plan and cost estimation have completed for every run in every workspace, including dry runs, where policies have been linked.
    - `attributes` object
      - `permissions` object
      - `result` object: OPA policy decision.
        - `advisory-failed` integer: Number of policy checks that have failed with 'advisory' level.
        - `duration-ms` integer: Duration of the policy check operation.
        - `hard-failed` integer: Number of policy checks that have failed with "hard-mandatory" level.
        - `passed` integer: Number of policy checks that have passed.
        - `policies` object[]: List of policies that were checked.
          - `messages` string[]
          - `name` string, required
          - `result` 'passed' | 'hard_failed' | 'soft_failed' | 'advisory_failed', required
          - `unit-path` string
        - `result` boolean: Indicates whether all policy checks have passed without failures.
        - `soft-failed` integer: Number of policy checks that have failed with "soft-mandatory" level.
        - `total-failed` integer: Total number of policy checks that have failed.
      - `status` 'pending' | 'queued' | 'passed' | 'errored' | 'hard_failed' | 'soft_failed' | 'overridden' | 'unreachable' | 'canceled': The Policy checks's current status. Transient states: * `pending` - The initial status of a policy check once it has been created. * `queued` - The policy check has been queued, awaiting backend service capacity to run terraform. * `running` - The policy check is running. * `soft_failed` Policy check has finished, and run hasn't passed policy with the `soft` level. User having `policy-checks:override` permission can override the policy check decision, and push this run next to apply. Final states: * `canceled` - The policy check has been canceled. * `errored` - The policy check has finished with an error. Attribute `error-message` contains the details. * `hard_failed` - Run hasn't passed policy with the `hard` level. * `overridden` - The policy check `soft_failed` status has been overridden. * `passed` - Run has successfully passed all configured policies. * `unreachable` - The policy check will not run.
      - `status-timestamps` object: Date/Time of transition to each status that has occurred.
    - `id` string
    - `links` object
      - `output` string: Link to download the policy check raw output.
    - `type` 'policy-checks', required
  - `included` object[]
  - `meta` object

## Other responses

- `403`: Policy check not found or user unauthorized to perform action.
- `4XX`: Client error.
- `5XX`: Server error.

---

[API](https://skmtc.dev/scalr/apis/scalr-iacp-api.md) - [All operations](https://skmtc.dev/scalr/apis/scalr-iacp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scalr/apis/scalr-iacp-api/revisions/d3e1dc85657a?raw)
