---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Get a Policy

Show details of a specific OPA policy.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Policy": {
        "description": "A policy provides details of a single OPA policy\nas declared in [scalr-policy.hcl](../../opa.html#creating-policy-groups).",
        "properties": {
          "attributes": {
            "properties": {
              "enabled": {
                "default": true,
                "description": "If set to `false`, the policy will not be evaluated during a run.",
                "readOnly": true,
                "type": "boolean"
              },
              "enforced-level": {
                "description": "The policy's enforcement level.\n\n* `hard-mandatory` - cannot be overridden.\n* `soft-mandatory` - can be overridden through an approval by account admins\nand other authorized roles.\n* `advisory` - provides a warning only.",
                "enum": [
                  "hard-mandatory",
                  "soft-mandatory",
                  "advisory"
                ],
                "readOnly": true,
                "type": "string"
              },
              "name": {
                "description": "The name of the policy.",
                "maxLength": 255,
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "self": {
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "relationships": {
            "properties": {
              "policy-group": {
                "description": "The policy group this policy belongs to.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "policy-groups",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "policies"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "PolicyDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Policy"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/policies/{policy}": {
      "get": {
        "description": "Show details of a specific OPA policy.",
        "operationId": "get_policy",
        "parameters": [
          {
            "description": "The ID of the policy to show.",
            "in": "path",
            "name": "policy",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyDocument"
                }
              }
            },
            "description": "Success."
          },
          "403": {
            "description": "User unauthorized to perform this action."
          },
          "404": {
            "description": "User not authorized or policy not found."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Get a Policy",
        "tags": [
          "policies"
        ],
        "x-resource": "Policy",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```