Query details about a tenant

2025-04-16 07:40:56  Updated

Description

You can call this operation to query details about a specific tenant in the specified OceanBase cluster.

Call description

Prerequisites

You have the read permission on the specified cluster.

Request path

GET /api/v2/ob/clusters/{clusterId}/tenants/{tenantId}

Path parameters

Parameter Type Required Example value Description
clusterld Long Yes 1 The ID of the cluster to which the target tenant belongs.
tenantId Long Yes 5 The ID of the target tenant.

Response parameters

Basic data structure

Parameter Type Description
data Object The details about the tenant.
successful Boolean Indicates whether the request was successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The amount of time taken by the server to process the request, in milliseconds.
status Integer The HTTP status code.
traceId String The trace ID of the request. This trace ID is used for troubleshooting.
server String The address of the server that responded to the request.

Data structure of tenant details

Parameter Type Description
id Long The ID of the tenant.
name String The name of the tenant.
clusterName String The name of the cluster to which the tenant belongs.
clusterId Long The ID of the cluster to which the tenant belongs.
obClusterId Long The ID of the cluster to which the tenant belongs in OceanBase Database.
clusterType String The type of the cluster to which the tenant belongs. Valid values:
  • PRIMARY
  • STANDBY
  • mode String The mode of the tenant. Valid values:
  • ORACLE
  • MYSQL
  • createTime Datetime The time when the tenant was created.
    primaryZone String The primary zone of the tenant.
    zoneList String The zones of the tenant.
    locality String The replica distribution of the tenant.
    status String The status of the tenant. Valid values:
  • NORMAL
  • CREATING
  • MODIFYING
  • DELETING
  • locked Boolean Indicates whether the tenant is locked.
    readonly Boolean Indicates whether the tenant is read-only.
    obVersion String The version of the OceanBase cluster to which the tenant belongs.
    description String The description of the tenant.
    charset String The character set.
    collation String The collation.
    zones Array For more information, see Data structure of TenantZone.
    whitelist String The access allowlist.
    loadType Enum The type of the load. Valid values:
  • EXPRESS_OLTP
  • COMPLEX_OLTP
  • HTAP
  • OLAP
  • KV
  • Data structure of TenantZone

    Parameter Type Description
    name String The name of the zone.
    replicaType String The type of the replica.
    resourcePool Object For more information, see Data structure of ResourcePool.
    units Array For more information, see Data structure of Unit.

    Data structure of ResourcePool

    Parameter Type Description
    id String The ID of the resource pool.
    name String The name of the resource pool.
    unitCount Integer The number of units.
    unitConfig Object For more information, see Data structure of UnitConfig.

    Data structure of UnitConfig

    Parameter Type Description
    maxCpuCoreCount Double The maximum number of CPU cores.
    minCpuCoreCount Double The minimum number of CPU cores.
    maxMemorySize Integer The maximum memory size, in GB.
    minMemorySize Integer The minimum memory size, in GB.

    Data structure of Unit

    Parameter Type Description
    id Integer The ID of the unit.
    resourcePoolId Integer The ID of the resource pool to which the unit belongs.
    serverId Integer The ID of the OBServer node to which the unit belongs.
    serverIp String The IP address of the OBServer node to which the unit belongs.
    serverPort Integer The port number of the OBServer node to which the unit belongs.
    zoneName String The name of the zone.
    status String The status of the unit.

    Examples

    Sample request

    GET /api/v2/ob/clusters/8/tenants/9

    Sample response

    {
        "data": {
            "arbitrationStatus": "DISABLED",
            "basicStandbyTenantList": [],
            "charset": "utf8mb4",
            "clusterId": 1000014,
            "clusterName": "cluster_0311",
            "clusterStatus": "RUNNING",
            "clusterType": "PRIMARY",
            "collation": "utf8mb4_general_ci",
            "createTime": "2025-03-11T13:46:46+08:00",
            "deadLockDetectionEnabled": true,
            "id": 1000007,
            "locality": "FULL{1}@zone2, FULL{1}@zone3",
            "locked": false,
            "logBackupInfo": {
                "runningLogBackup": false
            },
            "mode": "MYSQL",
            "name": "sys",
            "obClusterId": 1658110665,
            "obTenantId": 1,
            "obVersion": "4.2.3.0",
            "primaryZone": "RANDOM",
            "readonly": false,
            "role": "PRIMARY",
            "status": "NORMAL",
            "syncStatus": "VALID",
            "whitelist": "%",
            "zoneList": "zone2;zone3",
            "zones": [{
                "name": "zone2",
                "replicaType": "FULL",
                "resourcePool": {
                    "id": 1004,
                    "name": "pool_sys_zone2_nng",
                    "unitConfig": {
                        "iopsWeight": 1,
                        "logDiskSize": 18,
                        "logDiskSizeByte": 19327352832,
                        "maxCpuCoreCount": 1.50,
                        "maxIops": 0,
                        "maxMemoryByte": 6442450944,
                        "maxMemorySize": 6,
                        "minCpuCoreCount": 1.50,
                        "minIops": 0,
                        "minMemoryByte": 6442450944,
                        "minMemorySize": 6
                    },
                    "unitCount": 1,
                    "zoneList": ["zone2"]
                },
                "units": [{
                    "address": "11.162.218.177:2882",
                    "hostId": 1000007,
                    "id": 1003,
                    "obTenantId": 1,
                    "resourcePoolId": 1004,
                    "serverId": 1000053,
                    "serverIp": "11.162.218.177",
                    "serverPort": 2882,
                    "status": "ACTIVE",
                    "tenantName": "sys",
                    "zoneName": "zone2"
                }]
            },
            {
                "name": "zone3",
                "replicaType": "FULL",
                "resourcePool": {
                    "id": 1005,
                    "name": "pool_sys_zone3_efd",
                    "unitConfig": {
                        "iopsWeight": 1,
                        "logDiskSize": 18,
                        "logDiskSizeByte": 19327352832,
                        "maxCpuCoreCount": 1.50,
                        "maxIops": 0,
                        "maxMemoryByte": 6442450944,
                        "maxMemorySize": 6,
                        "minCpuCoreCount": 1.50,
                        "minIops": 0,
                        "minMemoryByte": 6442450944,
                        "minMemorySize": 6
                    },
                    "unitCount": 1,
                    "zoneList": ["zone3"]
                },
                "units": [{
                    "address": "11.124.9.222:2882",
                    "hostId": 1000004,
                    "id": 1004,
                    "obTenantId": 1,
                    "resourcePoolId": 1005,
                    "serverId": 1000054,
                    "serverIp": "11.124.9.222",
                    "serverPort": 2882,
                    "status": "ACTIVE",
                    "tenantName": "sys",
                    "zoneName": "zone3"
                }]
            }]
        },
        "duration": 145,
        "server": "5e11a5f435",
        "status": 200,
        "successful": true,
        "timestamp": "2025-03-20T10:39:06.195+08:00",
        "traceId": "5c373efa06c97ac0"
    }
    

    Contact Us