Skip to main content
POST
/
api
/
semantic-models
/
{model_id}
/
deploy
Deploy Model
curl --request POST \
  --url https://api.example.com/api/semantic-models/{model_id}/deploy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "create_schedule": false,
  "schedule_cron": "<string>",
  "register_in_datahub": true,
  "add_lineage": true,
  "create_dashboard": true
}
'
{
  "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "view_name": "<string>",
  "status": "draft",
  "deployed_at": "2023-11-07T05:31:56Z",
  "message": "<string>",
  "external_id": "<string>",
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "airflow_url": "<string>",
  "dashboard": {
    "dashboard_id": 123,
    "dashboard_url": "<string>",
    "embed_url": "<string>",
    "embed_token": "<string>",
    "chart_ids": [
      123
    ]
  }
}

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

Body

application/json

Request to deploy an approved model.

create_schedule
boolean
default:false

Create an Airflow DAG for refresh

schedule_cron
string | null

Cron schedule (required if create_schedule=True)

register_in_datahub
boolean
default:true

Register the deployed view in DataHub

add_lineage
boolean
default:true

Add lineage from source tables

create_dashboard
boolean
default:true

Create a Superset dashboard for the deployed model

Response

Model deployed

Response for model deployment.

model_id
string<uuid>
required
view_name
string
required
status
enum<string>
required

Status of a semantic model.

Available options:
draft,
pending_review,
approved,
rejected,
deployed,
failed,
archived
deployed_at
string<date-time>
required
message
string
required
external_id
string | null

DataHub URN if registered

job_id
string<uuid> | null

Airflow job ID if scheduled

airflow_url
string | null

Airflow DAG URL

dashboard
DashboardInfo · object

Superset dashboard info if created