Datasource
Datasource
[POST] /api/v2/data/datasources
Add new DataSource.
Request Schema
AddDataSourceRequestViewModelV2
Response
Status Code: 200
Success
AddDataSourceResponseViewModelV2
Status Code: 400
Bad Request
[PUT] /api/v2/data/datasources/{id}
Update data source.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
idRequired | string | path | Data source id. For example: 15fd3940-e83c-19d7-246d-81b2ccb7e195 |
Request Schema
UpdateDataSourceRequestViewModelV2
Response
Status Code: 200
Success
UpdateDatasourceResponseViewModelV2
Status Code: 400
Bad Request
Status Code: 404
Not Found
[GET] /api/v2/data/datasources/{id}
Queries the details of a specific data source by its ID and optionally by its version.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
idRequired | string | path | The unique identifier of the data source to query. |
version | int32 | query | The version of the data source to query. If not specified, the latest version is used. |
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
[GET] /api/v2/data/datasources/{id}/download
Download a datasource document.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
idRequired | string | path | document id. For example: 05bb029e-0d75-dc4d-671b-87299a4a6907 |
Response
Status Code: 200
Success
binary
Status Code: 400
Bad Request
Status Code: 404
Not Found
[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 Schema
QueryDataSourceWithPaginationModel
Response
Status Code: 200
Success
QueryDataSourcesWithPaginationResponseModel
Status Code: 400
Bad Request
[GET] /api/v2/data/datasources/task-status/{taskId}
Query data source task status by task id.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
taskIdRequired | string | path | Task id, prefixed with "datasource:". For example: datasource:a10f7bbc-a416-46e5-ab19-e79e2293a88a |
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
[GET] /api/v2/data/datasources/providers
Retrieves a list of available data source providers.
Response
Status Code: 200
Success
DataSourceProvidersResponseModel
Status Code: 400
Bad Request
[GET] /api/v2/data/datasources/{id}/query
Query datasource.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
idRequired | string | path | datasource 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
Status Code: 404
Not Found
[POST] /api/v2/data/datasources/{id}/query
Query datasource.
Parameters
Name | Type | Located In | Description |
---|---|---|---|
idRequired | string | path | datasource id |
Request Schema
Response
Status Code: 200
Success
binary
Status Code: 400
Bad Request
Status Code: 404
Not Found
Models
Ƭ AddDataSourceResponseViewModelV2
Response of add data source.
Name | Type | Description | Example |
---|---|---|---|
idNullable | string | Data source id. | |
nameNullable | string | Data source name. | |
providerNullable | string | Data source provider. |
Ƭ 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 |
Ƭ AddDataSourceRequestViewModelV2
Request of add data source.
Name | Type | Description | Example |
---|---|---|---|
name | string | Data source name. | "Data source name." |
provider | string | Data source prvider. | "SqlServer" |
connectionString | string | Connection string. | "Server=host; Database=Database; User ID=sa; Password=Password;" |
useAdvancedConfig | 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 |
extractInDatabase | 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 | |
mappingConfigNullable | string | The table/field name mapping. |
Ƭ UpdateDatasourceResponseViewModelV2
Response of update data source.
Name | Type | Description | Example |
---|---|---|---|
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 | 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 | Example |
---|---|---|---|
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 | 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 | Example |
---|---|---|---|
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 |
---|---|---|---|
name | string | Data source name. | "Data source name." |
provider | string | Data source prvider. | "SqlServer" |
connectionString | string | Connection string. | "Server=host; Database=Database; User ID=sa; Password=Password;" |
useAdvancedConfig | 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 |
extractInDatabase | 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 | |
mappingConfigNullable | string | The table/field name mapping. |
Ƭ DataSourceV2ViewModel
Represents a data source entity with configuration and metadata for version 2.
Name | Type | Description | Example |
---|---|---|---|
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 | 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. | |
typeNullable | string | The type of the data source. | |
editorConfigNullable | string | The editor configuration for the data source. |
Ƭ QueryDataSourcesWithPaginationResponseModel
Represents the response model for a query that retrieves a list of data sources along with pagination information.
Name | Type | Description | Example |
---|---|---|---|
dataNullable | 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 | Example |
---|---|---|---|
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. | |
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" |
Ƭ WorkerTaskStatusViewModelV2
Worker task status view model.
Name | Type | Description | Example |
---|---|---|---|
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 | Example |
---|---|---|---|
dataSourceProvidersNullable | 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 | Example |
---|---|---|---|
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 | 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 |