Collecting Asset Statistics, Including Accounts, Ports, and Processes
Function
This API is used to collect statistics on assets, such as accounts, ports, and processes.
URI
GET /v5/{project_id}/asset/statistics
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
host_id | No | String | Host ID |
category | No | String | Type. The default value is host. The options are as follows:
|
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 |
---|---|---|
account_num | Long | Number of server accounts |
port_num | Long | Number of open ports |
process_num | Long | Number of processes |
app_num | Long | Pieces of software |
auto_launch_num | Long | Number of auto-startup processes |
web_framework_num | Long | Number of web frameworks |
web_site_num | Long | Number of websites |
jar_package_num | Long | Number of JAR packages |
kernel_module_num | Long | Number of kernel modules |
web_service_num | Long | Number of web services |
web_app_num | Long | Number of web applications |
database_num | Long | Number of databases |
Example Requests
This API is used to query the fingerprint information, accounts, ports, and processes of a server.
GET https://{endpoint}/v5/{project_id}/asset/statistics?category=host
Example Responses
Status code: 200
Request succeeded.
{"account_num" : 5,"port_num" : 5,"process_num" : 5,"app_num" : 5,"auto_launch_num" : 5,"web_framework_num" : 5,"web_site_num" : 5,"jar_package_num" : 5,"kernel_module_num" : 5,"database_num" : 1,"web_app_num" : 8,"web_service_num" : 2}
Status Codes
Status Code | Description |
---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
- URI