All Products
Search
Document Center

Data Management:GetDatabase

Last Updated:Oct 21, 2024

Queries details of a specific database.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant. You can call the GetUserActiveTenant operation to query the ID of the tenant.

-1
HoststringYes

The endpoint that is used to connect to the database.

192.168.XX.XX
PortintegerYes

The port that is used to connect to the database.

3306
SidstringNo

The system identifier (SID) of the database.

Note The SID uniquely identifies an Oracle database. After a database is created, a SID is generated for the database.
test_sid
SchemaNamestringYes

The name of the database.

mysql

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

3CDB8601-AD74-4A47-8114-08E08CD6****
Databaseobject

The details of the database.

DatabaseIdstring

The ID of the database.

984****
Hoststring

The endpoint that is used to connect to the database.

192.168.XX.XX
CatalogNamestring

The name of the catalog to which the database belongs.

def
DbaNamestring

The nickname of the DBA.

dba_name
Statestring

The status of the database. Valid values:

  • NORMAL: The database is running as expected.
  • DISABLE: The database is disabled.
  • OFFLINE: The database is unpublished.
  • NOT_EXIST: The database does not exist.
NORMAL
DbaIdstring

The ID of the database administrator (DBA).

27****
SchemaNamestring

The name of the database.

mysql
InstanceIdstring

The ID of the instance.

149****
Portinteger

The port that is used to connect to the database.

3306
EnvTypestring

The type of the environment to which the database belongs. Valid values:

  • product: production environment
  • dev: development environment
  • pre: staging environment
  • test: test environment
  • sit: SIT environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: STAG environment
product
Sidstring

The SID of the database.

Note The value of the parameter is returned only for Oracle databases.
test_sid
OwnerIdListarray

The IDs of the owners of the database.

OwnerIdsstring
27****
Encodingstring

The encoding format of the database.

utf8mb4
DbTypestring

The type of the database. For more information about the valid values of this parameter, see DbType parameter.

mysql
OwnerNameListarray

The names of the owners of the database.

OwnerNamesstring
test
SearchNamestring

The keyword that is used to search for the database.

mysql@192.168.XX.XX:3306
InstanceAliasstring

The alias of the instance.

test
ErrorCodestring

The error code.

UnknownError
ErrorMessagestring

The error message.

An unknown error occurred.
Successboolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "3CDB8601-AD74-4A47-8114-08E08CD6****",
  "Database": {
    "DatabaseId": "984****",
    "Host": "192.168.XX.XX",
    "CatalogName": "def",
    "DbaName": "dba_name",
    "State": "NORMAL",
    "DbaId": "27****",
    "SchemaName": "mysql",
    "InstanceId": "149****",
    "Port": 3306,
    "EnvType": "product",
    "Sid": "test_sid",
    "OwnerIdList": {
      "OwnerIds": [
        "27****"
      ]
    },
    "Encoding": "utf8mb4",
    "DbType": "mysql",
    "OwnerNameList": {
      "OwnerNames": [
        "test"
      ]
    },
    "SearchName": "mysql@192.168.XX.XX:3306",
    "InstanceAlias": "test"
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "An unknown error occurred.",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-18The response structure of the API has changedView Change Details