Overview
Query the details of the SQL audit service for a specific tenant in an OceanBase Cloud instance. The response includes the service's current status, data retention policy, storage capacity configuration, and audit filter rules.
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}/tenants/{tenantId}/sqlaudit/serviceInfo
Request parameters
Path
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | OceanBase Cloud instance ID. | obcluster-***** |
| tenantId | String | Yes | Tenant ID. | t4louaeei**** |
Query
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| openRequest | String | Yes | Open request parameter. | N/A |
Response parameters
Name |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Indicates whether the request was successful. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Object | Business data (object). | N/A |
| cost | Number | Duration. | 1.0 |
| server | String | Server address, typically the IP address of an OBServer node. | 10.0.0.10 |
| requestId | String | Request ID. | d04eabba**** |
| totalCount | Number | Total number of records. | 100.0 |
| extra | Object | Extended information. | {} |
data object fields
Name |
Type |
Description |
Example value |
|---|---|---|---|
| tenantId | String | Tenant ID. | t4louaeei**** |
| status | String | Current status of the task or resource. | ONLINE |
| retentionTime | Integer | Data retention period. | 30 |
| hotDays | Integer | Number of days for retaining hot data. | 7 |
| serviceType | String | Address type. | PRIVATE |
| hotStorageSize | Integer | Hot data storage capacity. | 200 |
| coldStorageSize | Integer | Cold data storage capacity. | 200 |
| tenantName | String | Tenant name. | xxxxxx |
| filterRule | Object | Filter rule. | N/A |
| filterRule.allUsers | Boolean | All users. | true |
| filterRule.users | Array | User list. | ["admin"] |
| filterRule.auditResult | String | Audit result. | example-value |
| filterRule.sqlTypes | Array | SQL types. | [{"id": "resource-123456"}] |
| supported | Boolean | Indicates whether tenant sensitive field protection rules are supported. | true |
| disabledReason | String | Reason for disabling. | example-value |
Examples
Request example
curl --digest -u '<Your AccessKey ID:AccessKey Secret>' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/sqlaudit/serviceInfo?openRequest=example'
Response example
The response is in JSON format.
{
"success": true,
"errorCode": "INVALID_PARAMETER",
"errorMessage": "Invalid parameter",
"data": {
"tenantId": "t4louaeei****",
"status": "ONLINE",
"retentionTime": 30,
"hotDays": 7,
"serviceType": "PRIVATE",
"hotStorageSize": 200,
"coldStorageSize": 200,
"tenantName": "xxxxxx",
"filterRule": {
"allUsers": true,
"users": "---\n- \"admin\"",
"auditResult": "example-value",
"sqlTypes": [
{}
]
},
"supported": true,
"disabledReason": "example-value"
},
"cost": 1.0,
"server": "xxx.xxx.x.xxx:xxx",
"requestId": "d04eabba****",
"totalCount": 100.0,
"extra": "{}"
}
