Retrieves the details of a specific database in a data lake.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dlf:GetDatabase |
get |
*All Resource
|
None | None |
Request syntax
GET /api/metastore/catalogs/databases HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CatalogId |
string |
No |
The ID of the data catalog. |
1344371 |
| Name |
string |
No |
The name of the database. |
database_test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| Code |
string |
The status code. |
OK |
| Database | Database |
The database object. |
{"name":"test"} |
| Message |
string |
The returned message. |
. |
| RequestId |
string |
The request ID. |
D659761F-29C3-409D-805A-0CF33A320128 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Error codes for Code:
-
NoSuchObject: The specified database does not exist.
-
InternalError: An internal error occurred. For more information, see the value of Message.
Examples
Success response
JSON format
{
"Code": "OK",
"Database": {
"CreateTime": 1608707407,
"Description": "this is a hive database",
"LocationUri": "/hdfs/hivedb/data",
"Name": "database_test",
"OwnerName": "zhangsan",
"OwnerType": "USER",
"Parameters": {
"key": "key"
},
"Privileges": {
"GroupPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"RolePrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
},
"UserPrivileges": {
"key": [
{
"CreateTime": 1606226844,
"GrantOption": true,
"Grantor": "Grantor",
"GrantorType": "GrantorType",
"Privilege": "Privilege"
}
]
}
},
"UpdateTime": 1608707407,
"CreatedBy": "root"
},
"Message": ".",
"RequestId": "D659761F-29C3-409D-805A-0CF33A320128",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.