Updated on 2024-08-02 GMT+08:00

Querying Audit Logs of Killing Sessions

Function

Obtaining Audit Logs of Killing Sessions

Constraints

None

URI

  • URL format

    GET /v3/{project_id}/instances/{instance_id}/processes-audit-log?offset={offset}&limit={limit}&start_time={start_time}&end_time={end_time}

  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region.

    To obtain this value, see Obtaining a Project ID.

    instance_id

    Yes

    String

    DDM instance ID or ID of the associated RDS instance.

    offset

    No

    Integer

    Which page the server starts returning items. The default value is 0.

    The value is an integer greater than or equal to 0.

    limit

    No

    Integer

    Number of records displayed on each page. The default value is 10.

    Value range: 1 to 128.

    start_time

    Yes

    String

    Start time in UTC, accurate to milliseconds. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800.

    end_time

    Yes

    String

    End time in UTC, accurate to milliseconds. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. The interval between the start time and the end time must be no more than 7 days.

Request

Table 2 Parameter description

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

Example Request

Obtain the audit logs of killing a session.

GET https://{endpoint}/v3/{project_id}/instances/{instance_id}/processes-audit-log?start_time=2024-06-18T09:00:00+0800&end_time=2024-06-18T12:00:00+0800&offset=0&limit=10

Response

  • Normal response
    Table 3 Response body parameters

    Parameter

    Type

    Description

    total_count

    Integer

    Total records.

    process_audit_logs

    Array of Table 4 UserProcessAuditLog objects

    Audit log list of killing a session.

    Table 4 UserProcessAuditLog

    Parameter

    Type

    Description

    instance_id

    String

    Instance ID.

    instance_name

    String

    Instance name.

    process_id

    String

    Session ID.

    execute_user_name

    String

    Name of the user who performs the operation.

    excute_time

    String

    Operation time (UTC time).

  • Normal response example
    {
      "total_count": 1,
      "process_audit_logs": [
        {
          "instance_id": "5af0884170a84164980f79f9f5bf230c****",
          "instance_name": "UTS-ddm-name",
          "process_id": 6708736,
          "execute_user_name": "user_name",
          "execute_time": "2024-06-18T03:08:15+0800VGltZQ=="
        }
      ]
    }
    
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Codes

For details, see Error Codes.