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>",
  "accessGrants": [],
  "allowAsWorkbookBase": false
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "baseModelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "modelKind": "<string>",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

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.

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.

Response

Model created successfully

id
string<uuid>

ID of the model.

baseModelId
string<uuid> | null

ID of the base model, if applicable.

connectionId
string<uuid> | null

ID of the connection the model is based on.

modelKind
string | null

The type of model.

name
string | null

The name of the model.

createdAt
string<date-time>

The time the model was created.

updatedAt
string<date-time>

The time the model was last updated.

deletedAt
string<date-time> | null

The time the model was deleted, if applicable.