Overview
You can call this API to query the address of a tenant.
API details
Constraints
The caller must have an AccessKey for accessing APIs of multiple clouds. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenants/{tenantId}/address
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | string | Yes | The ID of the tenant. | ob2mr3oae0**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| addressId | String | Yes | The ID of the address. | rs-private-internet-751bc080-d862-4917-972e-48ae3d22****-OBPROXY-INTERNET-t6zffysc2bg2o-**** |
| requestId | String | Yes | The ID of the request. | 6e87d618-854e-4ca1-ae1f-babc******** |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| tenantId | String | The ID of the tenant. | ob2mr3oae0**** |
| tenantEndpointId | String | The ID of the tenant endpoint. | obe-6zfga5hc**** |
| addressId | String | The ID of the address. | rs-private-internet-751bc080-d862-4917-972e-48ae3d22****-OBPROXY-INTERNET-t6zffysc2bg2o-**** |
| addressStatus | String | The status of the address. | ONLINE |
| connectionZones | List |
The zones to which the address is connected. | ["cn-southwest-2a"] |
| serviceType | String | The service type. | OBPROXY_INTRANET, OBPROXY_INTERNET, OBPROXY_READONLY, and OBPROXY_READWRITE |
| addressType | String | The address type. | MASTER, READONLY, and READWRITE |
| networkType | String | The network type. | internet and intranet |
| role | String | The connection type. Valid values: READWRITE and READONLY. The primary address must be specified as READWRITE. The primary address of a standby database must be specified as READONLY. | |
| userNameFormat | String | The username format. | USER |
| useSSL | Boolean | Specifies whether to enable SSL. | true |
| proxyClusterId | String | The ID of the proxy cluster. | pxy-cluster-12345**** |
| proxyClusterInfo | String | The information about the proxy cluster. | The detailed configuration information about the proxy cluster. |
| internetAddress | String | The public IP address. | **... |
| internetPort | Integer | The public port. | 3306 |
| internetDomain | String | The public domain name. | t6zffysc2****.huawei-cn-southwest-2-internet.oceanbase.cloud |
| internetAddressStatus | String | The status of the public IP address. | ONLINE, OFFLINE, and PENDING |
| internetMaxConnectionNum | Integer | The maximum number of public connections. | 5000 |
| internetMaxConnectionNumLimit | Integer | The maximum number of public connections allowed. | 5000 |
| internetRpcPort | Integer | The public RPC port. | 2881 |
| internetProxyClusterId | String | The ID of the public proxy cluster. | pxy-internet-12345**** |
| vpcId | String | The ID of the VPC. | vpc-bp12********** |
| userVpcOwnerId | String | The ID of the VPC owner. | 123**********3456 |
| vSwitchId | String | The ID of the vswitch. | vsw-bp123******* |
| intranetDomain | String | The private domain name. | t6zffysc2****.huawei-cn-southwest-2-intranet.oceanbase.cloud |
| intranetAddress | String | The private IP address. | ...* |
| intranetAddressStatus | String | The status of the private IP address. | ONLINE, OFFLINE, and PENDING |
| intranetPort | Integer | The private port. | 3306 |
| maxConnectionNum | Integer | The maximum number of private connections. | 10000 |
| maxConnectionNumLimit | Integer | The maximum number of private connections allowed. | 10000 |
| intranetRpcPort | Integer | The private RPC port. | 2881 |
| privateLinkList | List | The information about the private link. | The configuration information about the private link service. |
| enableRPc | Boolean | Indicates whether to enable RPC for the primary address. This parameter is returned only when the primary address is specified. | true |
| odpVersion | String | The ODP version. This parameter is returned only when the primary address is specified. | 4.2.1 |
| readStrategyConfigResponse | Object | The information about the traffic strategy. This parameter is returned only when the primary address is specified. | The information about the traffic strategy, including the read/write separation and load balancing strategies. |
Examples
Request example
curl --digest -u 'ak:sk' \
--request GET \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/address'\
-H 'X-Ob-Project-Id: <Project ID>'\
-G -d 'addressId=xxx'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
Query the public IP address.
{ "data": [ { "addressId": "rs-private-internet-751bc080-d862-4917-972e-48ae3d22****-OBPROXY-INTERNET-t6zffysc2****-****", "addressStatus": "ONLINE", "addressType": "MASTER", "connectionZones": [ "cn-southwest-2a" ], "enableRPc": true, "internetAddressStatus": "ONLINE", "internetDomain": "t6zffysc2****.huawei-cn-southwest-2-internet.oceanbase.cloud", "internetMaxConnectionNum": 5000, "internetMaxConnectionNumLimit": 5000, "internetPort": 3306, "networkType": "INTERNET", "proxyClusterId": "proxy-6zfgafjc****", "proxyClusterInfo": { "createTime": "2025-08-11T08:31:24Z", "deployMode": "1-1", "proxyClusterId": "proxy-6zfgafjc****", "proxyMode": "k8s_shared", "proxyServiceVersion": "2.0", "proxyVersion": "4.3.1.5-62025052214", "status": "ONLINE", "unitNum": 1, "unitSpec": "2C4G", "zone": "cn-southwest-2a,cn-southwest-2d" }, "role": "READWRITE", "serviceType": "OBPROXY_INTERNET", "tenantEndpointId": "obe-6zfga5hc****", "tenantId": "t6zffysc2****", "useSSL": true, "userNameFormat": "USER" } ], "requestId": "6e87d618-854e-4ca1-ae1f-babcffd70000", "success": true }Query the PrivateLink IP address.
{ "data": [ { "addressId": "rs-private-intranet-751bc080-d862-4917-972e-48ae3d22****-OBPROXY-INTRANET-t6zffysc2****-****", "addressStatus": "PENDING_CREATE", "addressType": "MASTER", "connectionZones": [ "cn-southwest-2a" ], "enableRPc": true, "intranetAddressStatus": "ONLINE", "intranetPort": 3306, "maxConnectionNum": 5000, "maxConnectionNumLimit": 5000, "networkType": "INTRANET", "privateLinkList": [ { "deletePrivateLink": true, "privateLinkServiceId": "cn-southwest-2.pl_t6zffysc2****.30043e04-ff7a-4aad-9a74-8ddd4771****", "privateLinkStatus": "SERVICE_CREATED", "privateLinkUserAccount": "f151faba4a2a4fb3b4ecdf4128b****" } ], "proxyClusterId": "proxy-6zfgafj****", "proxyClusterInfo": { "createTime": "2025-08-11T08:31:24Z", "deployMode": "1-1", "proxyClusterId": "proxy-6zfgafjc****", "proxyMode": "k8s_shared", "proxyServiceVersion": "2.0", "proxyVersion": "4.3.1.5-62025052214", "status": "ONLINE", "unitNum": 2, "unitSpec": "2C4G", "zone": "cn-southwest-2a,cn-southwest-2d" }, "role": "READWRITE", "serviceType": "OBPROXY_INTRANET", "tenantEndpointId": "obe-6zfga5hc****", "tenantId": "t6zffysc2****", "useSSL": true, "userNameFormat": "USER" } ], "requestId": "6e87d618-854e-4ca1-ae1f-babcffd70000", "success": true }