Skip to main content
POST
/
v1
/
models
Create model
curl --request POST \
  --url https://{instance}.omniapp.co/api/v1/models \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "modelKind": "SCHEMA",
  "modelName": "<string>",
  "baseModelId": "<string>",
  "accessGrants": [],
  "allowAsWorkbookBase": false,
  "useIsolatedBranches": false
}
'
{
  "error": "<string>",
  "message": "<string>",
  "model": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "modelKind": "<string>",
    "name": "<string>"
  },
  "success": true
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Body

application/json
connectionId
string<uuid>
required

ID of the connection the model is based on.

modelKind
enum<string>
default:SCHEMA

Type of model.

  • SCHEMA - Mirrors the database structure
  • SHARED - Represents the universal, governed data model that workbooks are based on
  • SHARED_EXTENSION - Represents an extension to the SHARED model. Can be used to dynamically extend the SHARED model based on user attributes, or as a model that workbooks are based on in a departmental use case.
  • BRANCH - A model layer that is used to develop modifications to the production shared model

For more information, see the Modeling documentation.

Available options:
SCHEMA,
SHARED,
SHARED_EXTENSION,
BRANCH
modelName
string

Name of the model.

baseModelId
string

Applicable to branch and extension models. ID of the base model.

accessGrants
object[]

List of access grants for the model.

allowAsWorkbookBase
boolean
default:false

Only applicable to SHARED_EXTENSION models. If true, allows the model to be selected as a base model when creating workbooks.

useIsolatedBranches
boolean
default:false

Only applicable to SHARED_EXTENSION models. If true, branches are shown on the extension model page instead of parent shared model.

Response

Model created successfully

error
string

Error message if creation failed

message
string

Additional message

model
object

Details about the model

success
boolean

Indicates if the operation succeeded