Overview
You can call this API to detect the security configurations of a cluster and obtain the detection results and risk items at the cluster level.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. 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
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase Cloud instance. | obcluster-***** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| checkId | String | No | The unique identifier of the detection. | xxx |
| requestId | String | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
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 items detected. | 5 |
| data.totalRiskCount | Integer | The total number of risks detected. | 0 |
| data.securityConfigs | Array | The list of detected 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 suggestion. | xxx |
| data.securityConfigs[].configGroup | String | The detection group. | WHITELIST |
| data.securityConfigs[].configDescription | String | The name of the detection item. | Validate whether the whitelist of the cluster is too large. |
| data.checkTime | String | The check time. | 2023-08-07 15:30:00 |
| data.instanceId | String | The ID of the OceanBase Cloud instance. | ob317v4uif**** |
| data.checkId | String | The unique identifier of the detection. | xxx |
| success | Boolean | Indicates whether the request was successful. | true |
Examples
Request example
curl --digest -u '<your ak:sk>' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/security/securityConfig?requestId={requestId}'
Response example
JSON format
{
"data": {
"totalCheckCount": 5,
"totalRiskCount": 0,
"securityConfigs": [
{
"configName": "xxx",
"risk": true,
"riskDescription": "xxx",
"configGroup": "WHITELIST",
"configDescription": "Validate 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
}
