Querying the Ransomware Protection Server List 2.0
Function
This API is used to query the list of servers protected against ransomware. This API needs to be used together with Cloud Backup and Recovery (CBR). Ensure the site has CBR before using ransomware-related APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v5/{project_id}/ransomware/servers
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
enterprise_project_id | No | String | Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
offset | Yes | Integer | Definition Offset, which specifies the start position of the record to be returned. Constraints N/A Range The value range is 0 to 2,000,000. Default Value N/A |
limit | Yes | Integer | Definition Number of records displayed on each page. Constraints N/A Range Value range: 10 to 200 Default Value 10 |
host_name | No | String | Server name |
host_id | No | String | Server ID |
os_type | No | String | OS type. Its value can be: |
host_ip | No | String | Server EIP. |
private_ip | No | String | Server private IP address |
host_status | No | String | Server status. Its value can be: |
ransom_protection_status | No | String | Ransomware protection status. The options are as follows: |
protect_policy_name | No | String | Ransomware protection policy name |
policy_name | No | String | Protection policy name |
policy_id | No | String | Protection policy ID |
agent_status | No | String | Definition Agent status. Constraints N/A Range The agent statuses are as follows:
To filter agents in all the states except online, set the filter to not_online (used as a query condition only). Default Value N/A |
group_id | No | String | Server group ID |
group_name | No | String | Server group name |
last_days | No | Long | Number of days in the query time range. The value ranges from 1 to 30. If this parameter is not specified, one day is queried by default. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
total_num | Integer | Definition Total number. Range Value range: 0 to 65,535 |
data_list | Array of ProtectionServerInfo objects | Definition Query the list of servers protected against ransomware. Range Value range: 0 to 65,535 ProtectionServerInfo objects |
Parameter | Type | Description |
|---|---|---|
project_id | String | Definition Project ID. Range The value can contain 0 to 128 characters. |
enterprise_project_id | String | Definition Enterprise project ID. Range The value can contain 0 to 128 characters. |
host_id | String | Definition Server ID. Range The value can contain 0 to 128 characters. |
agent_id | String | Definition Agent ID Range The value can contain 0 to 128 characters. |
host_name | String | Definition Server name. Range The value can contain 0 to 128 characters. |
host_ip | String | Definition EIP. Range The value can contain 0 to 128 characters. |
private_ip | String | Definition Private IP address. Range The value can contain 0 to 128 characters. |
os_type | String | Definition OS type. Range The options are as follows: |
os_name | String | Definition System name. Range The value can contain 0 to 128 characters. |
host_status | String | Definition Server status. Range The options are as follows: |
ransom_protection_status | String | Definition Ransomware prevention status. Range The options are as follows: |
ransom_protection_fail_reason | String | Definition Ransomware protection failure cause. Range The options are as follows: |
failed_decoy_dir | String | Definition Directory where honeypot protection failed. (This parameter has a value only if certain honeypots failed to be deployed.) Range The value can contain 0 to 512 characters. |
agent_version | String | Definition Agent version. Range The value can contain 1 to 128 characters. |
protect_status | String | Definition Protection status. Range The options are as follows: |
group_id | String | Definition Server group ID. Range The value can contain 1 to 128 characters. |
group_name | String | Definition Server group name. Range The value can contain 1 to 128 characters. |
protect_policy_id | String | Definition Protection policy ID. Range The value can contain 1 to 128 characters. |
protect_policy_name | String | Definition Protection policy name. Range The value can contain 1 to 128 characters. |
backup_error | backup_error object | Backup error message |
backup_protection_status | String | Definition Whether to enable backup. Range The options are as follows: |
count_protect_event | Integer | Definition Number of protection events. Range Value range: 0 to 2,097,152 |
count_backuped | Integer | Definition Number of existing backups. Range Value range: 0 to 2,097,152 |
agent_status | String | Definition Agent status. Range
|
version | String | Definition Enabled HSS edition. Range The options are as follows: |
host_source | String | Definition Server type. Range The options are as follows: |
vault_id | String | Definition Vault ID. Range The value can contain 0 to 128 characters. |
vault_name | String | Definition Vault name. Range The value can contain 0 to 128 characters. |
vault_size | Integer | Definition Total capacity, in GB Range Value range: 0 to 2,097,152 |
vault_used | Integer | Definition Used capacity, in MB. Range Value range: 0 to 2,097,152 |
vault_allocated | Integer | Definition Allocated bound server capacity, in GB. Range Value range: 0 to 2,097,152 |
vault_charging_mode | String | Definition Vault creation mode. Range The options are as follows: |
vault_status | String | Definition Vault status. Range The options are as follows: |
backup_policy_id | String | Definition Backup policy ID. If this parameter is left blank, the backup policy is not bound. If this parameter has a value, check whether the backup policy is enabled based on the backup_policy_enabled field. Range The value can contain 1 to 128 characters. |
backup_policy_name | String | Definition Backup policy name. Range The value can contain 1 to 128 characters. |
backup_policy_enabled | Boolean | Definition Whether the policy is enabled. Range The options are as follows: |
resources_num | Integer | Definition Number of bound servers. Range Value range: 0 to 2,097,152 |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"agent_id" : "2758d2a61598fd9144cfa6b201049e7c0af8c3f1280cd24e3ec95a2f0811a2a2",
"agent_status" : "online",
"backup_error" : {
"error_code" : 1,
"error_description" : "Backup cannot be enabled because another vault has been bound."
},
"ransom_protection_status" : "opened",
"backup_protection_status" : "failed_to_turn_on_backup",
"count_backuped" : 0,
"count_protect_event" : 0,
"group_id" : "7c659ea3-006f-4687-9f1c-6d975d955f37",
"group_name" : "333",
"host_id" : "caa958ad-a481-4d46-b51e-6861b8864515",
"host_ip" : "100.85.119.68",
"host_name" : "Euler",
"host_status" : "ACTIVE",
"os_name" : "EulerOS",
"os_type" : "Linux",
"private_ip" : "100.85.123.9",
"protect_policy_id" : "0253edfd-30e7-439d-8f3f-17c54c99706",
"protect_policy_name" : "tst",
"protect_status" : "opened"
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
