更新时间:2025-09-23 GMT+08:00

获取软件信息的历史变动记录

功能介绍

获取软件信息的历史变动记录

URI

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

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户ID

表2 Query参数

参数

是否必选

参数类型

描述

host_id

String

主机id

host_ip

String

主机ip

host_name

String

主机名称

app_name

String

软件名称

variation_type

String

变更类型:

  • add :新建

  • delete :删除

  • modify :修改

enterprise_project_id

String

企业项目

sort_key

String

排序的key值

sort_dir

String

升序还是降序,默认升序,asc

limit

Integer

默认10

offset

Integer

默认是0

start_time

Long

变更开始时间,13位时间戳

end_time

Long

变更结束时间,13位时间戳

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

x-auth-token

String

iam token

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

total_num

Integer

总数,

data_list

Array of AppChangeResponseInfo objects

软件历史变动记录列表

表5 AppChangeResponseInfo

参数

参数类型

描述

agent_id

String

agent_id

variation_type

String

the type of change

  • add :新建

  • delete :删除

  • modify :修改

host_id

String

host_id

app_name

String

软件名称

host_name

String

弹性服务器名称

host_ip

String

服务器ip

version

String

版本号

update_time

Long

更新时间

recent_scan_time

Long

变更时间

请求示例

默认查询前10条开始时间为1700446175490,结束时间为1701050975490的软件信息的历史变动记录

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

响应示例

状态码: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
  } ]
}

状态码

状态码

描述

200

App change history info list

错误码

请参见错误码