Import a SELECT as a Rule's Fields
POST/api/v1/rules/import
Read a SELECT into the source and WHERE clause a rule is saved with, saving nothing.
The FROM becomes source when its table is a registered source. Otherwise
source is null and the caller picks one. The column list, ORDER BY, LIMIT, SETTINGS,
a {timestamp_condition} placeholder and time bounds on timestamp columns are dropped
and listed in dropped. GROUP BY, HAVING, a JOIN, a UNION, a WITH clause and a
subquery in FROM are refused with 422 import_refused.
Request
Responses
- 200
- 401
- 403
- 422
- default
Successful Response
No valid session: the credentials are missing, invalid or expired, or the account behind them is disabled or blocked
Refused: the session lacks the action this route checks, or its account must replace an issued password first. A SCIM route answers a refused action in the RFC 7644 error envelope
Refused. The body failed validation (code validation_error), or the SELECT has a shape a rule cannot carry: GROUP BY, HAVING, a JOIN, a UNION, a WITH clause or a subquery in FROM (code import_refused, the reason in detail).
Problem details (RFC 9457)