Skip to main content
POST
Approve model

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

model_id
string<uuid>
required

ID of the semantic model.

Body

application/json

Request to approve a semantic model.

approved_sql
string | null

Modified SQL. Use original if not provided.

review_notes
string | null

Review notes.

schedule_cron
string | null

Optional refresh schedule.

column_approvals
ColumnApprovalRequest · object[] | null

Column-level approvals/rejections.

Response

Model approved.

Response model for a semantic model.

name
string
required

Business-friendly model name.

domain_urn
string
required

DataHub domain URN.

domain_name
string
required

Human-readable domain name.

id
string<uuid>
required

The model's ID.

source_tables
string
required

Source table URNs, as a JSON-encoded string.

generated_sql
string
required

The AI-generated SQL for the view.

approved_sql
string | null
required

SQL to use instead of the AI-generated version, when set.

target_catalog
string
required

Trino catalog the view deploys to.

target_schema
string
required

Trino schema the view deploys to.

view_name
string | null
required

Name of the deployed materialized view, once deployed.

status
enum<string>
required

The model's lifecycle status.

Available options:
draft,
pending_review,
approved,
rejected,
deployed,
failed,
archived
ai_confidence_score
number | null
required

AI confidence score for this model.

ai_reasoning
string | null
required

The AI's reasoning for this model.

generation_task_id
string | null
required

ID of the generation task that created this model, if AI-generated.

reviewed_by
string | null
required

Keycloak username of who reviewed the model.

reviewed_at
string<date-time> | null
required

The model's review time.

review_notes
string | null
required

Notes left by the reviewer.

schedule_cron
string | null
required

Cron schedule for automatically refreshing the model's materialized view.

job_id
string<uuid> | null
required

Airflow job ID, if scheduled.

created_by
string
required

Keycloak username of who created the model.

owner_id
string | null
required

Keycloak username of the model's owner.

created_at
string<date-time>
required

The model's creation time.

updated_at
string<date-time>
required

When the model was last updated.

deployed_at
string<date-time> | null
required

The model's deployment time.

external_id
string | null
required

DataHub URN, if registered.

version
integer
required

The model's version number.

parent_model_id
string<uuid> | null
required

ID of the source model, present only for a duplicate or new version.

description
string
default:""

Model description.

advisories
Advisory · object[]

Non-blocking findings: sensitive columns, missing glossary terms, key fan-out, failing data-quality checks on the sources.

generation_context
GenerationContextUsed · object | null

The reference documents and business rules the model was generated with. Null for a model built by hand.