[]
        
(Showing Draft Content)

Datasource

Datasource

[POST] /api/v2/data/datasources

Add new DataSource.

Request Body

Description: Request of add data source.

Type: application/json

AddDataSourceRequestViewModelV2

Responses

[200] Success

AddDataSourceResponseViewModelV2

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[PUT] /api/v2/data/datasources/{id}

Parameters

Name In Type Description
idRequired path string Data source id. For example: 15fd3940-e83c-19d7-246d-81b2ccb7e195

Update data source.

Request Body

Description: Request of update data source.

Type: application/json

UpdateDataSourceRequestViewModelV2

Responses

[200] Success

UpdateDatasourceResponseViewModelV2

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

[GET] /api/v2/data/datasources/{id}

Parameters

Name In Type Description
idRequired path string The unique identifier of the data source to query.
version query integer The version of the data source to query. If not specified, the latest version is used.
extendMetaData query boolean Indicates whether you need to query extended information

Queries the details of a specific data source by its ID and optionally by its version.

Responses

[200] Success

DataSourceV2ViewModel

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

[GET] /api/v2/data/datasources/{id}/download

Parameters

Name In Type Description
idRequired path string document id. For example: 05bb029e-0d75-dc4d-671b-87299a4a6907

Download a datasource document.

Responses

[200] Success

binary

Type: [application/octet-stream]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

[POST] /api/v2/data/datasources/search

Queries data sources with pagination based on the provided search criteria, including support for multi-tenancy, user context, and extraction status.

Request Body

Description: The model containing search parameters and pagination settings.

Type: application/json

QueryDataSourceWithPaginationModel

Responses

[200] Success

QueryDataSourcesWithPaginationResponseModel

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[GET] /api/v2/data/datasources/task-status/{taskId}

Parameters

Name In Type Description
taskIdRequired path string Task id, prefixed with "datasource:". For example: datasource:a10f7bbc-a416-46e5-ab19-e79e2293a88a

Query data source task status by task id.

Responses

[200] Success

WorkerTaskStatusViewModelV2

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

[GET] /api/v2/data/datasources/providers

Retrieves a list of available data source providers.

Responses

[200] Success

DataSourceProvidersResponseModel

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[GET] /api/v2/data/datasources/{id}/query

Parameters

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

Query datasource.

Responses

[200] Success

binary

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

[POST] /api/v2/data/datasources/{id}/query

Parameters

Name In Type Description
idRequired path string datasource id

Query datasource.

Request Body

Description: query request

Type: application/json

QueryDataSourceRequestBody

Responses

[200] Success

binary

Type: [application/json]

[400] Bad Request

DatasetPluginErrorV2

Type: [application/json]

[404] Not Found

DatasetPluginErrorV2

Type: [application/json]

Models

Ƭ AddDataSourceResponseViewModelV2

Response of add data source.

Name Type Description
idNullable string Data source id.
nameNullable string Data source name.
providerNullable string Data source provider.
supportNativeQuery Boolean Data source provider support native query.
isNativeDataProvider Boolean Data source provider is native data provider.

Ƭ DatasetPluginErrorV2

Dataset plugin error model

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

Ƭ AddDataSourceRequestViewModelV2

Request of add data source.

Name Type Description Example
nameRequired string Data source name. "Data source name."
providerRequired string Data source prvider. "SqlServer"
connectionStringRequired string Connection string. "Server=host; Database=Database; User ID=sa; Password=Password;"
useAdvancedConfigRequired Boolean Whether to use the advanced configuration connection string. If not use the advanced configuration connection string, the ConnectionString need to be Server="host";User ID="sa";Password="Password";Database="Database". true
extractInDatabaseRequired Boolean Whether to extract data into the database. When the connectionString contains the SourceType field and the SourceType field is not "File System", ExtractInDatabase needs to be true false
mappingConfigNullable string The table/field name mapping.

Ƭ UpdateDatasourceResponseViewModelV2

Response of update data source.

Name Type Description
idNullable string Data source id.
nameNullable string Data source name.
providerNullable string Data source provider.
useAdvancedConfig Boolean Whether to use the advanced configuration connection string.
connectionStringNullable string Connection string.
mappingConfigsNullable Array<TableMappingInfoViewModelV2> The table/field name mapping.

Ƭ TableMappingInfoViewModelV2

Represents the mapping information for a table within a data source in version 2, including its original and display names, as well as its column mappings.

Name Type Description
tableOriginalNameNullable string The original name of the table as defined in the data source.
tableDisplayNameNullable string The name of the table intended for display purposes, potentially more user-friendly or descriptive than the original name.
columnsNullable Array<ColumnMappingInfoViewModelV2> A collection of column mapping information, representing the mapping between the original column names in the data source and their corresponding display names.

Ƭ ColumnMappingInfoViewModelV2

Represents the mapping information for a column within a data source in version 2, including its original and display names.

Name Type Description
columnOriginalNameNullable string The original name of the column as defined in the data source.
columnDisplayNameNullable string The name of the column intended for display purposes, potentially more user-friendly or descriptive than the original name.

Ƭ UpdateDataSourceRequestViewModelV2

Request of update data source.

Name Type Description Example
nameRequired string Data source name. "Data source name."
providerRequired string Data source prvider. "SqlServer"
connectionStringRequired string Connection string. "Server=host; Database=Database; User ID=sa; Password=Password;"
useAdvancedConfigRequired Boolean Whether to use the advanced configuration connection string. If not use the advanced configuration connection string, the ConnectionString need to be Server="host";User ID="sa";Password="Password";Database="Database". true
extractInDatabaseRequired Boolean Whether to extract data into the database. When the connectionString contains the SourceType field and the SourceType field is not "File System", ExtractInDatabase needs to be true false
mappingConfigNullable string The table/field name mapping.

Ƭ DataSourceV2ViewModel

Represents a data source entity with configuration and metadata for version 2.

Name Type Description
displayNameNullable string The display name of the data source.
idNullable string The unique identifier of the data source.
nameNullable string The name of the data source.
fileNameNullable string The file name associated with the data source.
providerNullable string The provider of the data source.
useAdvancedConfig Boolean Indicates whether advanced configuration is used for the data source.
connectionStringNullable string The connection string for the data source.
mappingConfigsNullable Array<TableMappingInfoViewModelV2> The mapping configurations for tables within the data source.
useUserContext Boolean Indicates whether user context is utilized in the data source.
useMultiTenant Boolean Indicates whether the data source supports multi-tenancy.
isExtracted Boolean Indicates whether the data source has been extracted.
supportNativeQuery Boolean Indicates whether the data source supports native queries.
supportDirectQuery Boolean Indicates whether the data source supports direct queries.
isCustomNativeQueryProvider Boolean Indicates whether the data source is custom native query provider.
typeNullable string The type of the data source.
editorConfigNullable string The editor configuration for the data source.
extendMetaData DatasourceExtendMeta

Ƭ DatasourceExtendMeta

Represents a ViewModel that contains meta information that needs to be additionally queried.

Name Type Description
hasParameters Boolean Indicates whether the datasource has parameters.
hasMultipleBaseAddresses Boolean Indicates whether the datasource has multiple base addresses.
hasEndpointParameters Boolean Indicates whether the datasource has endpoint parameters.

Ƭ QueryDataSourcesWithPaginationResponseModel

Represents the response model for a query that retrieves a list of data sources along with pagination information.

Name Type Description
dataNullable Array<DataSourceV2ViewModel> A list of data source view models. Each model provides detailed information about a specific data source.
pagination PaginationModel

Ƭ PaginationModel

Represents the pagination details for a dataset query, including the size of the page, the current page number, and the total number of items.

Name Type Description
pageSize int32 Gets or sets the number of items per page. This determines how many items are displayed on one page.
pageNumber int32 Gets or sets the current page number. This is used to calculate the offset for the items to be displayed.
total int64 Gets or sets the total number of items across all pages. This is used to calculate the total number of pages available.

Ƭ QueryDataSourceWithPaginationModel

Represents the model for querying data sources with pagination and filtering options.

Name Type Description Example
pageSize int32 Gets or sets the size of the page for pagination. 10
pageNumber int32 Gets or sets the number of the current page for pagination. 1
orderByNullable string Gets or sets the criteria for ordering the results. "+name"
searchNullable string Gets or sets the search term used to filter the results. "sales"
useMultiTenantNullable Boolean Gets or sets a value indicating whether to filter results based on multi-tenancy. true
useUserContextNullable Boolean Gets or sets a value indicating whether to filter results based on user context. false
isExtractedNullable Boolean Gets or sets a value indicating whether to filter results based on whether the data source has been extracted. true
providersNullable string Gets or sets the providers to include in the results. "SqlServer,Oracle"
filterProvidersNullable string Gets or sets the providers to exclude from the results. "MySQL"
extendMetaDataNullable Boolean Indicates whether to extend metadata. If true, we will calculate HasParameters, HasMultipleBaseAddresses, and HasEndpointParameters; otherwise, these three values will always be true. true

Ƭ WorkerTaskStatusViewModelV2

Worker task status view model.

Name Type Description
taskIdNullable string Task id.
status WorkerTaskStatusEnumV2
statusTextNullable string Task status.
startTimeNullable ISO DateTime Sting Start time.
endTimeNullable ISO DateTime Sting End time.
errorMessageNullable string Error message.
errorMessageKeyNullable string Error message key.
contextNullable string Context.
extraInfoNullable string Extra info.

Ƭ WorkerTaskStatusEnumV2

Enum:

  • Standby

  • Running

  • PrimaryTaskFinished

  • PrimaryTaskFaulted

  • PrimaryTaskUserCancelled

  • Finished

    Task status.

    * Standby - 0 - Standby.
    * Running - 1 - Running.
    * PrimaryTaskFinished - 2 - Primary task finished.
    * PrimaryTaskFaulted - 3 - Primary task faulted.
    * PrimaryTaskUserCancelled - 4 - Primary task was canceled by the user.
    * Finished - 7 - Finished.

Ƭ DataSourceProvidersResponseModel

Represents the response model for a request to retrieve data source providers, containing a collection of data source categories and their respective providers.

Name Type Description
dataSourceProvidersNullable Array<DataSourceCategoryViewModelV2> A collection of data source categories along with their respective providers.

Ƭ DataSourceCategoryViewModelV2

Represents the category and configuration details of a data source provider in version 2.

Name Type Description
nameNullable string The unique name identifier of the data source provider.
displayNameNullable string The display name of the data source provider for presentation purposes.
categoryNullable string The category to which the data source provider belongs.
editorConfigNullable string The editor configuration in JSON format, specifying the UI elements and behaviors for configuring the data source provider.
unavailable Boolean Indicates whether the data source provider is currently unavailable.
hasUserGuide Boolean Indicates whether there is a user guide available for the data source provider.

Ƭ QueryDataSourceRequestBody

Query data source request body

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

Ƭ Options

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