Overview
You can call this API to detect the security configurations of an OceanBase cluster and obtain the detection results and risks at the cluster level.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/security/securityConfig
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| checkId | String | No | The unique identifier of the detection. | xxx |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| requestId | String | The request ID. | EE205C00-30E4---87E3A8A2AA0C |
| data | Object | The detection results of the security configurations of the cluster. | - |
| data.totalCheckCount | Integer | The total number of security configurations of the cluster. | 5 |
| data.totalRiskCount | Integer | The total number of risks of the security configurations of the cluster. | 0 |
| data.securityConfigs | Array | The list of detection items. | - |
| data.securityConfigs[].configName | String | The name of the specific detection item. | xxx |
| data.securityConfigs[].risk | Boolean | Indicates whether a risk exists. | true |
| data.securityConfigs[].riskDescription | String | The security recommendation. | xxx |
| data.securityConfigs[].configGroup | String | The detection group. | WHITELIST |
| data.securityConfigs[].configDescription | String | The name of the detection item. | Check whether the whitelist of the cluster is too large. |
| data.checkTime | String | The time when the check was performed. | 2023-08-07 15:30:00 |
| data.instanceId | String | The ID of the OceanBase cluster. | ob317v4uif**** |
| data.checkId | String | The unique identifier of the detection. | xxx |
| success | Boolean | Indicates whether the call was successful. | true |
Examples
Request example
curl --digest -u 'ak:sk' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/security/securityConfig'
Response example
JSON format
{
"data": {
"totalCheckCount": 5,
"totalRiskCount": 0,
"securityConfigs": [
{
"configName": "xxx",
"risk": true,
"riskDescription": "xxx",
"configGroup": "WHITELIST",
"configDescription": "Check whether the whitelist of the cluster is too large"
}
],
"checkTime": "2023-08-07 15:30:00",
"instanceId": "ob317v4uif****",
"checkId": "xxx"
},
"requestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"success": true
}