Apps

Propose a data read for a rule-finding app

Changed on

Records one read-only SELECT over a source connection as pending; a workspace owner must approve it before it runs. Idempotent on the statement text: proposing the same text again returns the existing read in whatever state it is. Refused with 422 when the statement is not a single read-only SELECT, when key_column is not one of columns, or when the app already holds the most reads allowed. Requires the configure access tier on the app.

post/v1/apps/{id}/mining/templates

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Path parameters

id, string uuid required

Request body

AppRulesTemplateInput required
name, string required

The read's name

connection_id, string uuid required

The source connection the read runs on.

sql_text, string required

One read-only SELECT statement.

key_column, string required

The column that identifies each record; must be one of columns when those are given.

columns, string[]

The columns the read returns.

watermark_column, string

A column that orders records by change.

max_rows, integer

Most rows one run of the read returns; the deployment default when omitted.

feature_row, boolean

True when the read returns one flat row per record

params_schema, object

JSON Schema of the read's parameters.

Response

The proposed read (or the existing one with the same text).

AppRulesTemplate required

One data read a rule-finding app may run over a source connection once approved.

id, string uuid
app_id, string uuid
name, string
connection_id, string uuid
sql_text, string
sql_hash, string

Hex SHA-256 of the statement; a changed statement is a new read and needs a new approval.

params_schema, object nullable
key_column, string
columns, string[] nullable
watermark_column, string nullable
max_rows, integer
feature_row, boolean
state, 'pending' | 'approved' | 'revoked'
proposed_by, string nullable
proposed_in_round, string uuid nullable
approved_by, string nullable
approved_at, string date-time nullable
created_at, string date-time

Changes