Check Sql
POST/api/v1/sql/check
Check SQL access and rewrite with ResourceGuard policies applied.
Handles queries with JOIN (multiple tables): all referenced tables must pass the read access check, and policies from all non-owner tables are merged before SQL rewriting.
Returns:
{allowed: false, sql: null}when the user lacks read access to any referenced table.{allowed: true, sql: <original>}for admin, all-owner, or no applicable policies.{allowed: true, sql: <rewritten>}when row/column policies apply.
Request
Responses
- 200
- 422
Successful Response
Validation Error