Obtaining the Historical Change Records of Software Information
Function
This API is used to obtain the historical change records of software information.
URI
GET /v5/{project_id}/asset/app/change-history
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
host_id | No | String | Server ID |
host_ip | No | String | Server IP address |
host_name | No | String | Server name |
app_name | No | String | Software name |
variation_type | No | String | Change type. Its value can be:
|
enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
sort_key | No | String | Key value used for sorting. Currently, data can only be sorted by recent_scan_time, and the value of sort_dir determines whether to sort the data in ascending or descending order. |
sort_dir | No | String | Sorting order. The default order is descending. If sort_key is set to recent_scan_time, this parameter determines the sorting order. If sort_key is set to other values, data is sort in descending order.
|
limit | No | Integer | Number of records on each page |
offset | No | Integer | Offset, which specifies the start position of the record to be returned. |
start_time | No | Long | Start time of a change. Its value is a 13-digit timestamp. |
end_time | No | Long | End time of a change. Its value is a 13-digit timestamp. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a user token. |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
total_num | Integer | Number of software changes |
data_list | Array of AppChangeResponseInfo objects | Account change history |
Parameter | Type | Description |
---|---|---|
agent_id | String | Agent ID |
variation_type | String | Type of change.
|
host_id | String | host_id |
app_name | String | Software name |
host_name | String | Server name |
host_ip | String | Server IP address |
version | String | Version number |
update_time | Long | Updated |
recent_scan_time | Long | Last scanned |
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
Request succeeded.
{"total_num" : 1,"data_list" : [ {"agent_id" : "d83c7be8a106485a558f97446617443b87604c8116e3cf0453c2a44exxxxxxxx","variation_type" : "add","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 | Request succeeded. |
Error Codes
See Error Codes.
- URI