View role audit events¶
View the operation records of the specified role in chronological order, and filter by operation, executor or processing result.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/audit-events
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First select the character. If you need to continue reading, keep the cursor returned from the previous page.
Prepare personal access token and target workspace ID that can access the target workspace.
Request parameters¶
Replace $WORKSPACE_ID, $ROLE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl -G "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/audit-events" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
--data-urlencode "limit=20"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
The quantity per page, default is 20, range is 1~100. |
|
string |
No |
The cursor returned from the previous page. |
|
string |
No |
Filter by action type. |
|
string |
No |
Filter by operator principal ID. |
|
string |
No |
Filter by audit event status. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"events": [],
"next_cursor": "",
"request_id": "req-001",
"trace_id": "trace-001"
}
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Role audit events for the current page. |
|
string |
Audit event ID. |
|
string |
operation. |
|
string |
Operation ID. |
|
string |
Operator identity type. Value: |
|
string |
Operator ID. |
|
string |
Operator display name. |
|
string |
Currently effective role ID. |
|
string |
Target role ID. |
|
object |
Change content. |
|
string |
Summary of policy hash before modification. |
|
string |
Summary of modified policy hash. |
|
string |
Policy hash summary. |
|
string |
A version of the character diagram before modification. |
|
string |
Revised version of the character diagram. |
|
integer |
Enter the lifecycle version. |
|
integer |
Output lifecycle version. |
|
integer |
Life cycle version before modification. |
|
integer |
Modified life cycle version. |
|
string |
Status before modification. |
|
string |
Modified status. |
|
string |
operating status. |
|
string |
Repair status. |
|
array of string |
List of new items. |
|
array of string |
Remove item list. |
|
integer |
Number of new items. |
|
integer |
Number of items removed. |
|
integer |
Number of policy statements. |
|
boolean |
Whether authorization has been completed. |
|
string |
Receives an inherited role ID. |
|
string |
The inherited parent role ID. |
|
string |
Resource type. |
|
string |
Resource ID. |
|
string |
Target role ID. |
|
array of string |
Added action list. |
|
array of string |
Remove action list. |
|
integer |
Apply policy version. |
|
integer |
Ownership version. |
|
integer |
Data permission version. |
|
string |
Character diagram version. |
|
string |
Role lifecycle versions. |
|
string |
Policy schema version. |
|
string |
Request ID. |
|
string |
TraceID。 |
|
string |
status. |
|
string |
error code. |
|
integer |
Creation time. |
|
string |
Next page cursor. When empty there is no next page. |
|
string |
Request association ID. |
|
string |
Link tracking ID. |
Error response¶
Normal errors only return code and msg. When core error codes are present, data may contain request_id, trace_id, and core_error_code. Parse results by error response fields.
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
code |
string |
error code. |
msg |
string |
error message. |
data |
object |
Only errors carrying core error codes return this object. Other errors are omitted. |
data.request_id |
string |
Current request identifier. |
data.trace_id |
string |
The tracking ID of the current request. |
data.core_error_code |
string |
Core error code. |