You can call this operation to obtain the list of your databases.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetUserDatabases

The operation that you want to perform. Set the value to GetUserDatabases.

PageNumber String Yes 1

The number of the page to return.

PageSize String Yes 10

The number of entries to return on each page.

DbType String No MySQL

The type of the database.

Note Only MySQL databases are supported.
GatewayId String No dg-yhss6sdlaff****

The ID of the gateway.

SearchKey String No Gateway

The keyword used to query databases.

Response parameters

Parameter Type Example Description
Code String OK

The status code.

Count Integer 1

The total number of databases returned.

Data String [{\"dbDescription\":\"Database in a development environment\",\"dbType\":\"MySQL\",\"dbUserName\":\"dbatool\",\"gatewayId\":\"test_gateway\",\"gatewayName\":\"Gateway-1\",\"gmtCreate\":1560736969000,\"gmtCreateString\":\"2019-06-17 10:02\",\"host\":\"11.163.23.109\",\"instanceId\":\"instance_1\",\"parentId\":\"1344371\",\"port\":3440,\"userId\":\"1344371\"}]

The list of databases.

ErrorMsg String None

The error message.

RequestId String 951AE6AA-BFC5-4DD8-8CD6-DFD3D51E4170

The ID of the request.

Success String true

Indicates whether the call is successful.

Examples

Sample requests


http(s)://dg.[regionId].aliyuncs.com/?Action=GetUserDatabases
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<GetUserDatabasesResponse>
      <Data>[{"dbDescription":"Database in a development environment","dbType":"MySQL","dbUserName":"dbatool","gatewayId":"test_gateway","gatewayName":"Gateway-1","gmtCreate":1560736969000,"gmtCreateString":"2019-06-17 10:02","host":"11.163.23.109","instanceId":"instance_1","parentId":"1344371","port":3440,"userId":"1344371"}]</Data>
      <Count>1</Count>
      <RequestId>951AE6AA-BFC5-4DD8-8CD6-DFD3D51E4170</RequestId>
</GetUserDatabasesResponse>

JSON format

{
	"Data":"[{\"dbDescription\":\"Database in a development environment\",\"dbType\":\"MySQL\",\"dbUserName\":\"dbatool\",\"gatewayId\":\"test_gateway\",\"gatewayName\":\"Gateway-1\",\"gmtCreate\":1560736969000,\"gmtCreateString\":\"2019-06-17 10:02\",\"host\":\"11.163.23.109\",\"instanceId\":\"instance_1\",\"parentId\":\"1344371\",\"port\":3440,\"userId\":\"1344371\"}]",
	"Count":1,
	"RequestId":"951AE6AA-BFC5-4DD8-8CD6-DFD3D51E4170"
}

Error codes

For a list of error codes, visit the API Error Center.