Create Semantic Model
This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here. |
|---|
Overview
This API creates a new Semantic Model using the provided configuration details.
Method: POST
Request URL: {kyvos-url}/rest/v2/semantic-models
Authorization
API Key: sessionid
This method authenticates requests using a session ID which acts like an API key.
BasicAuth: HTTP Authorization Scheme
This method authenticates requests using a username and password sent in the HTTP Authorization header.
Headers
Header Name | Type | Description | Possible Values |
|---|---|---|---|
Content-Type (Required) | String | Specifies media type of request body. |
|
sessionid | String | The session ID is the token received from the login API. Note: Session ID is required for token-based authentication. | – |
Request Body
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
type | String | Type of Semantic Model to create, which can be either Multidimensional or Single Table. | MULTIDIMENSIONAL: Creates a traditional OLAP Semantic Model from a Data Relationship Diagram (DRD). Requires SINGLE_TABLE: Creates a Semantic Model directly from a single database table. Requires Default: |
viewType | String | If Semantic Model type is SINGLE_TABLE, then this parameter specifies whether the view type should be Flat or Smart. | FLAT_VIEW: The Semantic Model will be designed as a flat table, where all source data columns are included as attributes within a single dimension. SMART_VIEW: The system will intelligently identify measures and dimensions and create a more business-friendly Semantic Model view. This model will organise source data fields into measures, attributes, and hierarchies based on their data types. Default: |
name | String | Name of the Semantic Model to be created. This name is used to create the underlying entities associated with the Semantic Model. If a Semantic Model with the same name already exists in the specified folder, the system automatically generates a unique name. Note: Required only when type=SINGLE_TABLE. | – |
folderName | String | Name of the folder in which the Semantic Model will be created. If the folder does not exist, a new folder with the provided name is created. Note: Required only when type=SINGLE_TABLE. | – |
connectionName | String | Name of the connection to be used for the Dataset. Note: Required only when type=SINGLE_TABLE. | – |
dbName | String | Name of the database to be used in the Dataset. Note: Required only when type=SINGLE_TABLE. | – |
tableName | String | Name of the table to be used in the Dataset. Note: Required only when type=SINGLE_TABLE. | – |
schemaName | String | Name of the schema to be used in the Dataset. Note: Required only when type=SINGLE_TABLE. | – |
json (Required) | String | JSON definition containing the Semantic Model structure and configuration details. Note: An example JSON definition is provided under the Resources section below. | – |
Responses
200 Success
{
"code": 0,
"message": "Successfully added semantic model object: Account Model"
}Status Code | Description |
|---|---|
401 | Authorization information is missing or invalid. |
404 | Connection, database, schema, or table not found. |
412 | Precondition failed. Required parameter missing. |
500 | Internal Server Error |
Use Cases
You can create a basic semantic model using an existing database table with simple dimensions (basic hierarchies and levels), measures, and calculated measures. Examples of these using a simplified Semantic Model JSON format are given under the Resources section below.
Resources
JSON Examples for request body parameter and use cases.