Overview
You can call this API to query the list of tenant allowlist groups. For more information about how to use allowlist groups, see Set tenant allowlist groups.
API details
Constraints
Before calling this API, obtain an AccessKey ID and an AccessKey Secret. For more information, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenants/{tenantId}/securityIpGroups
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | OceanBase Cloud instance ID. | ob317v4uif**** |
| tenantId | string | Yes | Tenant ID. | t4louaeei**** |
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | string | Yes | Request ID used for tracking. | d04eabba-acef-4f4b-96f1-c657876ca6f1 |
Response parameters
| Field | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Whether the request succeeded. Check this field to determine whether the operation succeeded, even if the HTTP status code is 200. | true |
| errorCode | string | Business error code. Can be null or omitted on success. | — |
| errorMessage | string | Business error message. Can be null or omitted on success. | — |
| data | object | Query result. Can be null if the operation fails. | — |
| data.dataList | object[] | List of tenant allowlist groups. | — |
| data.dataList[].tenantId | string | Tenant ID. Can be null. | tenant-example |
| data.dataList[].securityIpGroupName | string | Allowlist group name. Can be null. | application |
| data.dataList[].securityIpGroupType | string | Source of the allowlist group. Can be null. Valid values:
securityIpGroupType set to tenant. |
tenant |
| data.dataList[].securityIps | string | Comma-separated string of IP addresses or CIDR ranges. Can be null. | 203.0.113.10,203.0.113.20 |
| data.total | integer (int64) | Total number of allowlist groups returned by this query. | 1 |
| data.hasMore | boolean | Whether more data is available. This API can return null or omit this field. | — |
| cost | integer (int64) | Request duration. Can be null. | — |
| server | string | Server address. Can be null. | — |
| requestId | string | Request ID used for tracking. Can be null. | 00000000-0000-4000-8000-000000000001 |
| totalCount | integer (int64) | Total count at the response root level. Can be null. For the number of items returned by this API, see data.total. |
— |
| extra | object | Additional information. Can be null. | — |
Examples
Request example
curl \
--digest -u 'xxx:xxx' \
--request GET \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/securityIpGroups?requestId={requestId}' \
-H 'X-Ob-Project-Id: <Project ID>'
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
{
"success": true,
"requestId": "00000000-0000-4000-8000-000000000001",
"data": {
"dataList": [
{
"tenantId": "tenant-example",
"securityIpGroupType": "tenant",
"securityIpGroupName": "application",
"securityIps": "203.0.113.10,203.0.113.20"
}
],
"total": 1
}
}