Skip to main content
POST
Migrate a model

Authorizations

Authorization
string
header
required

Requires an Organization API Key. Personal Access Tokens (PATs) are not supported for this endpoint.

Include in the Authorization header as: Bearer ORGANIZATION_API_KEY

Path Parameters

modelId
string<uuid>
required

The shared model ID to read YAML from.

Body

application/json
gitRef
string
required

Git reference (branch name, tag, or commit SHA) to read the source model YAML from.

Example:

"main"

targetModelId
string<uuid>
required

The shared model ID to write the YAML to.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

branchName
string

Required if the target model has git enabled.. Branch name on the target model. If the branch doesn't exist, it will be created.

Example:

"migrate-from-prod"

commitMessage
string

Git commit message.

Example:

"Migrate model from production"

deleteViewsAndTopicsMissingFromSource
boolean
default:true

Controls how views and topics present in the target model but missing from the source model are handled. When true (default), these views and topics are marked as ignored: true. When false, they are inherited from the parent model instead.

Example:

true

Response

Model migrated successfully

success
boolean

Whether the migration completed successfully.

Example:

true