Overview
You can call this API to query the allowlist groups of a specified cluster. For more information about allowlist groups, see Set 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}/securityIpGroups
Request parameters
Path
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | string | Yes | OceanBase Cloud instance ID. | obcluster-***** |
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 |
|---|---|---|
| success | boolean | Whether the request succeeded. Check this field to determine whether the operation succeeded, even if the HTTP status code is 200. |
| 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 cluster allowlist groups. |
| data.dataList[].securityIpGroupName | string | Allowlist group name. Can be null. |
| data.dataList[].securityIps | string | Comma-separated string of IP addresses or CIDR ranges. Can be null. |
| data.total | integer (int64) | Total number of allowlist groups returned by this query. |
| 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. |
| 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 '<AccessKey ID>:<AccessKey Secret>' \
--request GET \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/securityIpGroups?requestId={requestId}'
Response example
Allowlist groups found
{
"success": true,
"requestId": "00000000-0000-4000-8000-000000000001",
"data": {
"dataList": [
{
"securityIpGroupName": "office",
"securityIps": "192.0.2.10,198.51.100.0/24"
}
],
"total": 1
}
}
No allowlist groups found
If no allowlist groups are found, dataList is an empty array and total is 0.
{
"data": {
"dataList": [],
"total": 0
},
"requestId": "12ab8421-ca70-4294-b328-ca60b8bd4fb9",
"success": true
}