Skip to content
HALOWERK

Code and API Checks

sql statement policy review

SQL policy review screens a statement for protected tables, writes and commands needing human review. Use it when an agent needs a read-only preflight decision before submitting SQL.

POST https://code.halowerk.com/v1/sql-statement-policy-review

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
sqlstringYes
dialectstringNo
policyobjectNo
Show full input schema
{
  "type": "object",
  "properties": {
    "sql": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
    },
    "dialect": {
      "type": "string",
      "maxLength": 16
    },
    "policy": {
      "type": "object",
      "properties": {
        "read_only": {
          "type": "boolean"
        },
        "protected_tables": {
          "type": "array",
          "maxItems": 24,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        }
      },
      "required": [],
      "additionalProperties": false
    }
  },
  "required": [
    "sql"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "dialect": "postgres",
  "sql": "DELETE FROM orders",
  "policy": {
    "read_only": false
  }
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "decision": {
          "type": "string"
        },
        "commands": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "decision",
        "commands",
        "rules"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub โ†’