Overview
You can call this API to query the security configuration detection items of a tenant.
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/tenantSecurityConfig
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase Cloud instance. | ob317v4uif**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| tenantId | String | No | The ID of the tenant. | t4louaeei**** |
| checkId | String | No | The unique identifier of the security detection. | **** |
| requestId | String | Yes | The request ID, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| requestId | String | The request ID. | 523E7183-1490-590D-BA03-12DFD316614B |
| data | Object | The detection result of the security configuration. | - |
| data.totalCheckCount | Integer | The total number of security configuration detection items. | 4 |
| data.totalRiskCount | Integer | The total number of detected risk items. | 0 |
| data.tenantSecurityConfigs | Array | The list of detection results of each tenant. | - |
| data.tenantSecurityConfigs[].tenantId | String | The ID of the tenant. | xxx |
| data.tenantSecurityConfigs[].tenantName | String | The name of the tenant. | xxx |
| data.tenantSecurityConfigs[].riskCount | Integer | The number of risk items of the tenant. | 0 |
| data.tenantSecurityConfigs[].securityConfigs | Array | The list of risk items of the tenant. | - |
| data.tenantSecurityConfigs[].securityConfigs[].configGroup | String | The risk group. | WHITELIST |
| data.tenantSecurityConfigs[].securityConfigs[].configName | String | The name of the risk item. | WHITELIST_RANGE_LARGE |
| data.tenantSecurityConfigs[].securityConfigs[].risk | Boolean | Indicates whether a risk exists. | true |
| data.tenantSecurityConfigs[].securityConfigs[].riskDescription | String | The description of the risk. | The whitelist is opened too broadly. We recommend that you set it as needed. |
| data.tenantSecurityConfigs[].securityConfigs[].configDescription | String | The name of the detection item. | Check whether the whitelist range of the cluster is too broad. |
| data.checkId | String | The unique identifier of the security detection. | xxx |
| data.instanceId | String | The ID of the OceanBase Cloud instance. | ob317v4uif**** |
| data.checkTime | String | The time when the security detection was performed. | 2023-08-07 15:30:00 |
| success | Boolean | Indicates whether the call was successful. | true |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/security/tenantSecurityConfig?requestId={requestId}'
Response example
JSON format
{
"data": {
"totalCheckCount": 4,
"totalRiskCount": 0,
"tenantSecurityConfigs": [
{
"tenantId": "xxx",
"tenantName": "xxx",
"riskCount": 0,
"securityConfigs": [
{
"configGroup": "WHITELIST",
"configName": "WHITELIST_RANGE_LARGE",
"risk": true,
"riskDescription": "The whitelist is opened too broadly. We recommend that you set it as needed.",
"configDescription": "Check whether the whitelist range of the cluster is too broad."
}
]
}
],
"checkId": "xxx",
"instanceId": "ob317v4uif****",
"checkTime": "2023-08-07 15:30:00"
},
"requestId": "523E7183-1490-590D-BA03-12DFD316614B",
"success": true
}
