Help Center/ Data Security Center/ API Reference/ API Description/ Asset Management/ Configuring Operation Audit for an OBS Bucket Asset
Updated on 2026-01-13 GMT+08:00

Configuring Operation Audit for an OBS Bucket Asset

Function

This API is used to enable or disable the operation audit function for a specified OBS bucket. After the function is enabled, operations will be recorded and managed.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/{project_id}/sdg/asset/obs/buckets/{bucket_id}/audit

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used to identify a specific project.

bucket_id

Yes

String

Bucket ID, which is used to identify an OBS bucket.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

operation_status

No

Boolean

Whether to enable audit. true indicates that audit is enabled, and false indicates that audit is disabled.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

msg

String

Returned message, which is used to describe the operation result or error information.

status

String

Return status, for example, '200', '400'.

Status code: 201

Operation audit is created.

Example Requests

PUT /v1/{project_id}/sdg/asset/obs/buckets/{bucket_id}/audit

{
  "operation_status" : true
}

Example Responses

None

Status Codes

Status Code

Description

200

Operation audit is configured.

201

Operation audit is created.

401

Unauthorized access. The request is rejected.

403

Unauthorized operation. The request is rejected.

404

The specified bucket or project does not exist. Configuration failed.

Error Codes

See Error Codes.