Help Center> Host Security Service (New)> API Reference> API Description> Asset Management> Obtaining the Historical Change Records of Software Information
Updated on 2024-01-31 GMT+08:00

Obtaining the Historical Change Records of Software Information

Function

This API is used to obtain the historical change records of software information.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/asset/app/change-history

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

User ID

Minimum: 1

Maximum: 256

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

host_id

No

String

Server ID

Minimum: 0

Maximum: 128

host_ip

No

String

Server IP address

Minimum: 0

Maximum: 128

host_name

No

String

Server name

Minimum: 0

Maximum: 128

app_name

No

String

Software name

Minimum: 0

Maximum: 128

variation_type

No

String

Change type. Its value can be:

  • add

  • delete

  • modify

Minimum: 0

Maximum: 10

enterprise_project_id

No

String

Enterprise project

Minimum: 0

Maximum: 256

sort_key

No

String

Sort key

Minimum: 1

Maximum: 128

sort_dir

No

String

Whether to sort data in ascending or descending order. Default value: asc

Minimum: 1

Maximum: 32

limit

No

Integer

Default value: 10

Minimum: 10

Maximum: 100

Default: 10

offset

No

Integer

Default value: 0

Minimum: 0

Maximum: 10000

Default: 0

start_time

No

Long

Start time of a change. Its value is a 13-digit timestamp.

Minimum: 0

Maximum: 9007199254740992

end_time

No

Long

End time of a change. Its value is a 13-digit timestamp.

Minimum: 0

Maximum: 9007199254740992

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

x-auth-token

Yes

String

iam token

Minimum: 32

Maximum: 4096

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Integer

Total number

Minimum: 0

Maximum: 10000

data_list

Array of AppChangeResponseInfo objects

Account change history

Array Length: 0 - 10000

Table 5 AppChangeResponseInfo

Parameter

Type

Description

agent_id

String

agent_id

Minimum: 0

Maximum: 128

variation_type

String

Type of change.

  • add

  • delete

  • modify

Minimum: 0

Maximum: 10

host_id

String

host_id

Minimum: 1

Maximum: 128

app_name

String

Software name

Minimum: 1

Maximum: 128

host_name

String

ECS name

Minimum: 1

Maximum: 128

host_ip

String

Server IP address

Minimum: 1

Maximum: 256

version

String

Version number

Minimum: 1

Maximum: 128

update_time

Long

Update time

Minimum: 0

Maximum: 4824430336000

recent_scan_time

Long

Change time

Minimum: 0

Maximum: 4824430336000

Example Requests

The first 10 software change records whose start time is 1700446175490 and end time is 1701050975490 are queried by default.

GET https://{endpoint}/v5/{project_id}/asset/app/change-history?start_time=1700446175490&end_time=1701050975490

Example Responses

Status code: 200

App change history info list

{
  "total_num" : 1,
  "data_list" : [ {
    "agent_id" : "d83c7be8a106485a558f97446617443b87604c8116e3cf0453c2a44exxxxxxxx",
    "variation_type" : "abnormal_behavior",
    "host_id" : "f4aaca51-xxxx-xxxx-xxxx-891c9e84d885",
    "app_name" : "hostguard",
    "host_name" : "host_name",
    "host_ip" : "host_ip",
    "version" : "3.2.3",
    "update_time" : 1668246126302,
    "recent_scan_time" : 1668246126302
  } ]
}

Status Codes

Status Code

Description

200

App change history info list

Error Codes

See Error Codes.