---
title: "Test OPA policy evaluation"
method: POST
path: "/v1/org/opa-policies/test"
tags: ["OPA Policies"]
---

# Test OPA policy evaluation

`POST /v1/org/opa-policies/test`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/org/opa-policies/test`
- Auth: HTTP bearer

Evaluate the organization's OPA policies against a test input.

## Request body

- OpaPolicyTestRequest
  - `principal_type` string, required
  - `principal_id` string, uuid, required
  - `action` string, required
  - `resource_path` string, required
  - `vault_id` string, uuid, required
  - `context` object

## Response `200`

Policy evaluation result

- OpaPolicyTestResponse
  - `decision` 'allow' | 'deny'
  - `backend` string
  - `enforcement_status` 'shadow' | 'enforce' | 'inactive'
  - `note` string

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
