List operation logs

View the operation records of the current identity in the current workspace by paging according to conditions, which can be used to trace operation time, results and related resources.

HTTP
GET $CLOUDSIGMA_API_BASE/audit/logs

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. Prepare personal access token and current workspace ID with current workspace access rights.

Request parameters

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.

Shell
curl -G "$CLOUDSIGMA_API_BASE/audit/logs" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode 'method=POST' \
  --data-urlencode 'result=success' \
  --data-urlencode 'start_time=2026-08-18T00:00:00Z' \
  --data-urlencode 'end_time=2026-08-18T01:00:00Z' \
  --data-urlencode 'page=1' \
  --data-urlencode 'page_size=20'

Query parameters

Parameter

Type

Required

Description

method

string

No

Filter by request method.

result

string

No

Filter by operation results. You can fill in success, failed or other.

status_code

integer

No

Filter by status code.

start_time

string

No

Query start time, for example 2026-08-18T00:00:00Z.

end_time

string

No

Query end time, for example, 2026-08-18T01:00:00Z.

page

integer

No

Page numbers, starting from 1.

page_size

integer

No

The number of records returned per page.

result supports success, failed and other. operator_user_id is not currently participating in screening.

When the operator is the current user, the name in the current alias or profile will be displayed first. The name may be different from when the operation occurred.

Query time and paging

The time must be filled in with the complete date, time and time zone. When the page number is omitted or less than 1, use page 1. When the number of items per page is omitted or less than 1, 20 is used, and the maximum is 200.

Filter operation logs

When reading the next page, keep the original filter conditions and add 1 to page. For example, read page 2:

Shell
curl -G "$CLOUDSIGMA_API_BASE/audit/logs" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode 'method=POST' \
  --data-urlencode 'result=success' \
  --data-urlencode 'start_time=2026-08-18T00:00:00Z' \
  --data-urlencode 'end_time=2026-08-18T01:00:00Z' \
  --data-urlencode 'page=2' \
  --data-urlencode 'page_size=20'

When the cumulative number of read logs reaches the total number, or when there is no record on the current page, page turning stops.

Successful response

JSON
{
  "code": "OK",
  "msg": "success",
  "data": {
    "items": [
      {
        "id": "0190e1b6-7fe3-7cc2-9d7f-f589f9d37653",
        "workspace_id": "workspace-123",
        "operator_user_id": "user-123",
        "operator_name_snapshot": "张三",
        "method": "POST",
        "path": "/workflow/v2/workflow-apps",
        "route_pattern": "/workflow/v2/workflow-apps",
        "status_code": 200,
        "result": "success",
        "duration_ms": 35,
        "created_at": "2026-08-21T07:00:00Z"
      }
    ],
    "total": 1,
    "page": 1,
    "page_size": 20
  }
}

Field

Type

Description

data.items

array of object

Operation log of this page.

data.items[].id

string

Log ID.

data.items[].workspace_id

string

The workspace ID to which the log belongs.

data.items[].operator_user_id

string

The user ID that performed the operation.

data.items[].operator_name_snapshot

string

The name of the operator saved during recording.

data.items[].method

string

Request method.

data.items[].path

string

The actual request path.

data.items[].route_pattern

string

Routing template.

data.items[].query_json

string

Logged query parameters.

data.items[].request_body_json

string

Logged request content.

data.items[].response_body_json

string

Logged response content.

data.items[].status_code

integer

status code.

data.items[].result

string

Operation result, success, failed or other.

data.items[].error_code

string

error code.

data.items[].error_message

string

error message.

data.items[].duration_ms

integer

The operation takes time, in milliseconds.

data.items[].client_ip

string

Client IP.

data.items[].user_agent

string

Client ID.

data.items[].request_id

string

Request ID.

data.items[].action_type

string

Operation type.

data.items[].resource_type

string

Resource type.

data.items[].resource_id

string

Resource ID.

data.items[].resource_name

string

Resource name.

data.items[].operation_summary

string

Operation summary.

data.items[].metadata_json

string

Additional information.

data.items[].created_at

string

Log creation time. RFC 3339 time.

data.total

integer

The total number of logs that meet the filter criteria.

data.page

integer

The page number used for this response.

data.page_size

integer

The actual number of entries per page used in this response.

When you need to know the number of successful and failed operations first, use Query Operation Log Overview.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

error message.

data

null

—。

Last updated on