# Alibaba Cloud DataManage - DatabaseGateway API

> Alibaba Cloud DataManage - DatabaseGateway API on Apizie: 21 endpoints (Use this API to connect databases on other clouds or on-premises to Alibaba Cloud, Adds multiple databases to a gateway in a batch operation, Checks if Database Gateway (DG) is enabled, Call this API to test database connectivity, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:aliyun-dms-dg`
- Category: Cloud
- Status: byok
- Source: https://api.alibabacloud.com/product/dms-dg
- Page: https://zieapi.vercel.app/api/cloud/aliyun-dms-dg
- OpenAPI: https://zieapi.vercel.app/api/cloud/aliyun-dms-dg/openapi.json

Alibaba Cloud OpenAPI for DataManage - DatabaseGateway (dms-dg, version 2023-09-14). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Use this API to connect databases on other clouds or on-premises to Alibaba Cloud
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/add-database` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the gateway |
| Host | string | yes | The database endpoint, as accessible from the gateway |
| Port | integer | yes | The database port, as accessible from the gateway |
| DbType | string | no | The database type |
| DbUserName | string | no | The database username |
| DbPassword | string | no | The database password. This password is used only to verify the connection and is not used for other operations |
| DbDescription | string | no | A description of the database |
| RegionId | string | yes | The region where the database is located |
| DbName | string | no | The database name |
| ClientToken | string | no | A client-generated token that ensures request idempotence. This token must be unique for each request, be case-sensitive, and have a… |

### Adds multiple databases to a gateway in a batch operation
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/add-database-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| DatabaseString | string | yes | A JSON string that contains information about the databases to add |
| ClientToken | string | no | A unique, client-generated token that ensures request idempotency. The token is case-sensitive and can be up to 64 ASCII characters long |

### Checks if Database Gateway (DG) is enabled
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/check-dgenabled` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |

### Call this API to test database connectivity
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/connect-database` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The gateway ID |
| Host | string | yes | The address used to access the database via the gateway host |
| Port | integer | yes | The port used to access the database via the gateway host |
| DbType | string | no | The database type |
| DbUserName | string | no | The database username |
| DbPassword | string | no | The database password |
| DbName | string | no | The database name |

### Creates a new database gateway
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/create-gateway` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayName | string | yes | The name of the database gateway |
| GatewayDesc | string | no | The description of the database gateway |
| RegionId | string | no | The region where the database gateway is created |

### Generates a verification code to link an on-premises Database Gateway installation to its corresponding…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/create-gateway-verify-code` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The gateway ID |

### Deletes a database from a database gateway
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/delete-database` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| InstanceId | string | yes | The ID of the database instance |

### Deletes the specified gateway
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/delete-gateway` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The gateway ID |

### Deletes the specified database gateway instance
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/delete-gateway-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the gateway |
| GatewayInstanceId | string | yes | The ID of the gateway instance |
| RegionId | string | yes | The region where the gateway is located |

### Queries the regions where you can create database gateways
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/describe-regions` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| RegionId | string | no | The region ID |

### Retrieves the download URL for the gateway program. Any Alibaba Cloud user can call this operation without…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/download-gateway-program` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| UserOS | string | no | The operating system of the gateway |
| DgVersion | string | no | The DG version |

### Retrieves the details of a gateway, including the user who created it and the number of running gateway…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/find-user-gateway-by-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the gateway |

### This API lists the databases in a specified gateway
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/get-user-databases` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | no | The ID of the gateway |
| PageSize | string | no | The number of entries to return on each page |
| PageNumber | string | no | The page number to return |
| SearchKey | string | no | The keyword for the search |
| DbType | string | no | The database type |
| InstanceId | string | no | The ID of the database instance |
| RegionId | string | no | The region of the gateway |
| Host | string | no | The host address of the database that the gateway can access |
| Port | integer | no | The database port that the gateway can access |

### Call this API to get the details of the gateway node
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/get-user-gateway-instances` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the gateway |

### Retrieves a list of user-created Database Gateways
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/get-user-gateways` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| PageSize | integer | no | The number of entries per page |
| PageNumber | integer | no | The page number to retrieve |
| SearchKey | string | no | The keyword to search for gateways |
| RegionId | string | no | The ID of the region where the gateway is located |

### Gets a list of database access points
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/list-database-access-point` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | no | The gateway ID |
| PageSize | string | no | The number of entries per page |
| PageNumber | string | no | The page number to return |
| SearchKey | string | no | The search keyword |
| DbInstanceId | string | no | The database instance ID |
| RegionId | string | no | The ID of the region where the gateway is located |
| Host | string | no | The host address the gateway uses to connect to the database |
| Port | integer | no | The port the gateway uses to connect to the database |
| VpcId | string | no | The ID of the VPC where the database access point is located |

### This operation modifies database information, such as its description
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/modify-database` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| Host | string | yes | The address used to connect to the database from the gateway host |
| Port | integer | yes | The port used to connect to the database from the gateway host |
| DbType | string | no | The database type |
| DbUserName | string | no | The username used to connect to the database |
| DbPassword | string | no | The password used to connect to the database |
| DbDescription | string | no | The database description |
| InstanceId | string | yes | The database instance ID |
| DbName | string | no | The database name |

### Call this API to modify the basic information of a gateway, including the gateway name and gateway description
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/modify-gateway` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayName | string | yes | The gateway name |
| GatewayDesc | string | no | The gateway description |
| GatewayId | string | yes | The gateway ID |

### Call this API operation to reconnect a database gateway to a database
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/retry-database` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the database gateway |
| Host | string | yes | The hostname or IP address of the database |
| Port | integer | yes | The port number of the database |
| DbType | string | no | The type of the database |
| DbUserName | string | no | The username used to access the database |
| DbPassword | string | no | The password used to access the database |
| DbDescription | string | no | The description of the database |
| RegionId | string | yes | The ID of the region |
| DbName | string | no | The name of the database |
| ClientToken | string | no | A client-generated token to ensure the idempotence of the request. The token must be unique across requests and is case-sensitive. It can… |

### Stops a gateway
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/stop-gateway` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |
| GatewayId | string | yes | The ID of the gateway |
| GatewayInstanceId | string | no | The ID of the gateway node instance |

### version
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/version` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dms-dg.ap-southeast-1.aliyuncs.com |

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/add-database" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud DataManage - DatabaseGateway API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:aliyun-dms-dg/add-database with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Alibaba Cloud DataManage - DatabaseGateway API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Alibaba Cloud DataManage - DatabaseGateway itself also needs your own key from aliyuncs.com.

### Can AI agents use the Alibaba Cloud DataManage - DatabaseGateway API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:aliyun-dms-dg.

### What is the status of the Alibaba Cloud DataManage - DatabaseGateway API?
Needs your own provider key (bring your own key)
