List user audit events

View the operation records of the specified user in the current workspace in chronological order.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/users/{user_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 user. 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

Shell
curl -G "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/users/$USER_ID/audit-events" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode "limit=20"

Path parameters

Parameter

Type

Required

Description

workspace_id

string

Yes

Target workspace ID.

user_id

string

Yes

The IAM user ID of the accepted member, taken from the iam_user_id of the same record in the user list.

Query parameters

Parameter

Type

Required

Description

cursor

string

No

The cursor returned from the previous page.

limit

integer

No

The quantity per page, default is 20, range is 1~100.

When data.next_cursor is not empty, use it as cursor for the next request. Stop turning pages when empty.

user_id in the path fills in the iam_user_id returned by the user list, and the member must have accepted the invitation. id in the list is the product account UID and cannot replace iam_user_id. Pending invitations cannot be used with this interface.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "events": [],
    "next_cursor": "",
    "request_id": "req-001",
    "trace_id": "trace-001"
  }
}

Field

Type

Description

code

string

success code.

msg

string

Response information.

data

object

The data returned by this operation.

data.events

array of object

User operation record of the current page.

data.events[].audit_event_id

string

Association ID.

data.events[].event_type

string

Audit event type.

data.events[].operation_id

string

Association ID.

data.events[].actor_principal_type

string

Operator type. The values are user, internal_service

data.events[].actor_principal_id

string

Association ID.

data.events[].actor_display_name

string

Display information.

data.events[].effective_role_id

string

Association ID.

data.events[].status

string

status.

data.events[].summary

array of object

Summary.

data.events[].summary[].key

string

Match key.

data.events[].summary[].value

string

Value.

data.events[].lifecycle_version

string

Lifecycle version.

data.events[].created_at

integer

Creation time.

data.next_cursor

string

Next page cursor. When empty there is no next page.

data.request_id

string

Request association ID.

data.trace_id

string

Link tracking ID.

Error response

The only common errors are code and msg, and data:null is not returned. data is only possible if there is a core authorization error code, which contains the request ID, tracking ID, and core error code.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

INVALID_ARGUMENT, ErrParamInvalid, ErrIAMInheritanceInvalid, ErrIAMRoleLifecycleInvalid, ErrIAMRoleDeleteInvalid

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden, ErrWorkspaceAccessDenied, IAM_ERROR_CODE_PERMISSION_DENIED

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

USER_NOT_FOUND, ErrNotFound, ErrIAMResourceNotFound, IAM_ERROR_CODE_RESOURCE_NOT_FOUND

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

IAM_ERROR_CODE_IDEMPOTENCY_CONFLICT, IAM_ERROR_CODE_LIFECYCLE_CONFLICT, ErrIAMInheritanceConflict, ErrIAMRoleDeleteConflict, ErrIAMRoleDeleteResultUnknown, ErrIAMWorkspaceMemberLifecycleResultUnknown

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

INTERNAL, ErrIAMRoleDeleteFailed, ErrIAMWorkspaceMemberLifecycleFailed, ErrIAMWorkspaceMemberLifecycleIncomplete, ErrIAMRoleWriteFailed

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrCoreAuthorizeUnavailable, IAM_ERROR_CODE_CORE_AUTHORIZE_UNAVAILABLE, ErrIAMRoleReadUnavailable, ErrIAMRolePermissionViewUnavailable, ErrIAMRoleInheritanceUnavailable, ErrIAMRoleAdministrationUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on