[]
        
(Showing Draft Content)

DataModel

DataModel

[GET] /api/v2/data/data-models/analysis-models/{documentId}/download

Download a model document.

Parameters

Name Type Located In Description
documentIdRequired string path document id. For example: b48bb95f-7bb7-c55b-c251-b118e6bee4bb

Response

Status Code: 200

Success

binary

Status Code: 400

Bad Request

DatasetPluginErrorV2

Status Code: 404

Not Found

DatasetPluginErrorV2

[GET] /api/v2/data/data-models/{id}/query

Query data model.

Parameters

Name Type Located In Description
idRequired string path data model id
query string query query
queryType string query query type
format string query format
UnknownTypeHandle string query unknown type handle
MissParameterHandle string query miss parameter handle
RowLimit string query row limit

Response

Status Code: 200

Success

binary

Status Code: 400

Bad Request

DatasetPluginErrorV2

Status Code: 404

Not Found

DatasetPluginErrorV2

[POST] /api/v2/data/data-models/{id}/query

Query data model.

Parameters

Name Type Located In Description
idRequired string path data model id

Request Schema

QueryDataModelRequestBody

Response

Status Code: 200

Success

binary

Status Code: 400

Bad Request

DatasetPluginErrorV2

Status Code: 404

Not Found

DatasetPluginErrorV2

[POST] /api/v2/data/data-models/analysis-models/batch-rebuild-cache

Rebuild the cached model cache.

Request Schema

BatchRebuildModelsRequestViewModelV2

Response

Status Code: 200

Success

RebuildModelCacheResponseViewModelV2

Status Code: 400

Bad Request

AnalysisModelErrorV2

[POST] /api/v2/data/data-models/cache-models/{documentId}/sync

Start a loading data task to reload data according to the table structure in the data source. Triggered by the sync function in the designer.

Parameters

Name Type Located In
documentIdRequired string path

Request Schema

SyncEntitiesRequestViewModelV2

Response

Status Code: 200

Success

SyncEntitiesResponseModelV2

Status Code: 400

Bad Request

AnalysisModelErrorV2

Status Code: 404

Not Found

AnalysisModelErrorV2

Models

Ƭ DatasetPluginErrorV2

Dataset plugin error model

Name Type Description Example
codeNullable string Error code
messageNullable string Error message
contextNullable string Error context
innerError DatasetPluginErrorV2
extendedResultNullable any Extended result

Ƭ QueryDataModelRequestBody

Query data model request body

Name Type Description Example
datasourceParametersNullable string Datasource parameters
queryNullable string Query
queryTypeNullable string QueryType
formatNullable string Format
options Options

Ƭ Options

Name Type Description Example
unknownTypeHandleNullable string Unknown type handle
missParameterHandleNullable string Miss parameter handle
rowLimitNullable string Row limit

Ƭ RebuildModelCacheResponseViewModelV2

Represents a rebuild model cache response model.

Name Type Description Example
documentIdNullable string Document id.
succeeded Boolean Result of rebuild task.
errorCode int32 Error code when the rebuild failed.
errorMessageNullable string Error message when the rebuild failed.
modified ISO DateTime Sting Rebuild cache data time.

Ƭ AnalysisModelErrorV2

Analysis model plugin error model

Name Type Description Example
codeNullable string Error code
messageNullable string Error message
contextNullable string Error context
innerError AnalysisModelErrorV2
extendedResultNullable any Extended result

Ƭ BatchRebuildModelsRequestViewModelV2

Represents a batch rebuild model.

Name Type Description Example
documentIds Array<string> Document id array ["5b0a797d-3f47-420e-a34b-37b3fd9ed934","d5b53d25-cb57-43a5-a027-cac17522e785"]

Ƭ SyncEntitiesResponseModelV2

Represents a sync entities data response model.

Name Type Description Example
queryIdNullable string Task ID, which can be used to query task progress.

Ƭ SyncEntitiesRequestViewModelV2

Represents a sync entities request model.

Name Type Description Example
lockNo string The lock number of the current document. "0acd06af-2077-4cff-976a-76061a1dd626"
dataSourceInfos DataSourceInfoViewModel A list of data sources for the cached model.
entities EntityViewModel Entities that need to sync.

Ƭ DataSourceInfoViewModel

Represents a datasource model.

Name Type Description Example
id string Datasource id. "8b8b1cc9-413c-4ba0-8563-824153dde1e7"
type ViewModelDataSourceType
provider string Datasource provider. "Oracle"
connectionStringNullable string Datasource connection string.
documentIdNullable string Referenced data source document ID. "79590916-839a-4a99-a634-98e7f502c4b9"
documentVersionNullable int32 Referenced data source document version.

Ƭ EntityViewModel

Represents an entity model.

Name Type Description Example
id string Entity id. "47732d38-f453-432b-8d3d-b6d4e2227ad"
name string Entity name. "userName"
binding string Entity binding. "[dbo].[User]"
bindingType ViewModelEntityBindingType
attributes AttributeViewModel Attributes of entity.
isHidden Boolean Indicates whether the entity is hidden.
entityParameterCollection EntityParameterCollectionViewModel
dataSourceId string The id of the data source to which the current entity belongs. "af3c4241-a6b2-4a86-90d0-4eda941856eb"
generatedNameNullable string Reserved field, not used for now.
isSupportIncrementalUpdate Boolean Indicates whether the current entity supports incremental updates. true

Ƭ ViewModelDataSourceType

Enum:

  • Embedded
  • Referenced

Datasource type.

* Embedded - 0 - Embedded datasource.
* Referenced - 1 - Referenced datasource.

Ƭ ViewModelEntityBindingType

Enum:

  • DatabaseTable
  • CustomSQLTable
  • LocalEntity

Entity binding type.

* DatabaseTable - 0 - Database table.
* CustomSQLTable - 1 - Custom sql statement table.
* LocalEntity - 2 - Local entity.

Ƭ AttributeViewModel

Represents an attribute model.

Name Type Description Example
id string Attribute id. "a9d47ea8-aa33-4af6-943f-548abf0db44e"
name string Attribute name. "userName"
binding string Attribute binding.
isNullable Boolean Whether the attribute is nullable. true
isUnique Boolean Indicates whether the attribute values are unique.
bindingType ViewModelAttributeBindingType
dataType ViewModelAttributeLogicalDataType
dataVizAIHint ViewModelDataVizAIHint
clrDataTypeName string The name of the Common Language Runtime (CLR) data type of the attribute. "System.String"
isHidden Boolean Indicates whether the attribute is hidden.
isDate Boolean Indicates whether the attribute is a date.
generatedNameNullable string Reserved field, not used for now.
isContainTimeZoneNullable Boolean Indicates whether the attribute value contains a time zone.
originNameNullable string The original name of the attribute. "name"
isUnsupportedNullable Boolean Indicates whether the attribute type is unsupported.

Ƭ EntityParameterCollectionViewModel

Represents a collection of parameters of a web json data source entity.

Name Type Description Example
entityParameters EntityParameterViewModel List of entity parameters.

Ƭ ViewModelAttributeBindingType

Enum:

  • DatabaseTableColumn
  • PrimitiveSQLExpression

Attribute binding type.

* DatabaseTableColumn - 0 - Database table column
* PrimitiveSQLExpression - 1 - custom sql expression column

Ƭ ViewModelAttributeLogicalDataType

Enum:

  • Number
  • Text
  • Boolean
  • Binary
  • GUID
  • Date
  • DateTime
  • Unknown

Attribute data type.

* Number - 0 - Number
* Text - 1 - Text
* Boolean - 2 - Boolean
* Binary - 3 - Binary
* GUID - 4 - GUID
* Date - 5 - Date
* DateTime - 6 - Datetime
* Unknown - 7 - Unknown type

Ƭ ViewModelDataVizAIHint

Enum:

  • None
  • Currency
  • ImageURL
  • ImageBinary
  • GeoRegion
  • GeoLatitude
  • GeoLongitude

DataVizAIHint

* None - 0 - None.
* Currency - 1 - Currency.
* ImageURL - 2 - Image URL.
* ImageBinary - 3 - Image binary.
* GeoRegion - 4 - Geo region.
* GeoLatitude - 5 - Geo latitude.
* GeoLongitude - 6 - Geo longitude.

Ƭ EntityParameterViewModel

Represents a entity parameter view model.

Name Type Description Example
parameterName string Parameter name. "name"
literalValueNullable string The parameter value displayed as text. "Bob"
valueType ViewModelAttributeLogicalDataType
isMultivalued Boolean Whether the current parameter is a multivalued parameter.