Skip to main content

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​

Successful Response