Querying All Databases

Function

This API is used to query the information about all the databases.

URI

Request

None

Response

Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

Boolean

Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

No

String

System prompt. If execution succeeds, the parameter setting may be left blank.

database_count

No

Integer

Total number of databases.

databases

No

Array of objects

Database information. For details, see Table 4.

Table 4 databases parameters

Parameter

Mandatory

Type

Description

database_name

No

String

Name of a database.

owner

No

String

Creator of a database.

table_number

No

Integer

Number of tables in a database.

description

No

String

Information about a database.

enterprise_project_id

Yes

String

Enterprise project ID. The value 0 indicates the default enterprise project.

NOTE:

Users who have enabled Enterprise Management can set this parameter to bind a specified project.

Example Request

None

Example Response

{
  "is_success": true,
  "message": "",
  "database_count": 1,
  "databases": [
    {
      "database_name": "db2",
      "description": "this is for test",
      "owner": "tenant1",
      "table_number": 15

    }
  ]
}

Status Codes

Table 5 describes the status code.

Table 5 Status codes

Status Code

Description

200

The query is successful.

400

Request error.

500

Internal service error.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.