Queries a list of databases in an instance, cluster, or data catalog in Data Map. For DLF or StarRocks data sources, you can call this API operation to query databases in a data catalog. For StarRocks data sources, you can call this API operation to query databases in internal catalogs. For other types of data sources, you can call this API operation to query databases in an instance or cluster.
Operation description
-
DataWorks Basic Edition or a higher edition is required.
-
For the StarRocks type, only the Internal catalog is supported.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ListDatabases |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ParentMetaEntityId |
string |
Yes |
The parent entity ID. For more information, see Concepts related to metadata entities. You can refer to the ListCrawlerTypes operation for the parent entity type.
ParentMetaEntityId format examples
Note
|
holo:instance_id |
| Name |
string |
No |
The name. Supports fuzzy match. |
test_tbl |
| Comment |
string |
No |
The comment. Supports fuzzy match. |
test comment |
| SortBy |
string |
No |
The sort field. Default value: CreateTime. Valid values:
|
CreateTime |
| Order |
string |
No |
The sort order. Default value: Asc. Valid values:
|
Asc |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of records per page. Default: 10. Maximum: 100. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
9DD08926-38B9-XXXXXXX |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| PagingInfo |
object |
The pagination result. |
|
| TotalCount |
integer |
The total number of records returned. |
1 |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of records per page. |
10 |
| Databases |
array |
The database list. |
|
| Database |
The database information. |
Examples
Success response
JSON format
{
"RequestId": "9DD08926-38B9-XXXXXXX",
"Success": true,
"PagingInfo": {
"TotalCount": 1,
"PageNumber": 1,
"PageSize": 10,
"Databases": [
{
"Id": "holo-database:h-xxxx::test_db",
"Name": "test_db",
"Comment": "test comment",
"LocationUri": "oss://test-bucket/test_db",
"ParentMetaEntityId": "holo:h-xxxx",
"CreateTime": 1736852168000,
"ModifyTime": 1736852168000
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.