Queries a list of data sources based on the business information of data sources.
Operation description
- This API operation is available for all DataWorks editions.
- You can call this operation only if you are assigned one of the following roles in DataWorks:
- Tenant Owner, Workspace Administrator, Deploy, Develop, Visitor, Workspace Owner, O&M, Model Designer, Security Administrator, Data Analyst, OpenPlatform Administrator, and Data Governance Administrator
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectId | long | Yes | The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied. | 17820 |
Name | string | No | The name of the data source. Fuzzy match by data source name is supported. | test |
Types | array | No | The data source types. This parameter specifies a filter condition. You can specify multiple data source types. | |
string | No | The data source type. | mysql | |
EnvType | string | No | The environment in which the data sources are used. Valid values:
| Prod |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Default value: 10. Maximum value: 100. | 10 |
SortBy | string | No | The field that you want to use to sort the data sources. Valid values:
Default value: Id | Id |
Order | string | No | The order in which you want to sort the data sources. Valid values:
Default value: Asc | Asc |
Tags | string | No | The tag of the data source. This parameter specifies a filter condition.
| ["tag1", "tag2", "tag3"] |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "7BE1433F-6D55-5D86-9344-CA6F7DD19B13",
"PagingInfo": {
"TotalCount": 131,
"PageSize": 10,
"PageNumber": 1,
"DataSources": [
{
"Name": "test",
"Type": "mysql",
"DataSource": [
{
"Id": 16035,
"ConnectionProperties": "{\n\t\"envType\": \"Prod\",\n\t\"regionId\": \"cn-beijing\",\n \"instanceId\": \"hgprecn-cn-x0r3oun4k001\",\n \"database\": \"testdb\",\n \"securityProtocol\": \"authTypeNone\",\n \"authType\": \"Executor\",\n \"authIdentity\": \"1107550004253538\"\n}",
"ConnectionPropertiesMode": "UrlMode",
"Description": "test ",
"CreateTime": 1648711113000,
"CreateUser": "1624387842781448",
"ModifyTime": 1648711113000,
"ModifyUser": "1624387842781448",
"QualifiedName": "1648711121000:cn-beijing:odps:yongxunQA_beijing_standard"
}
]
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|