Skip to content

Latest commit

 

History

History
239 lines (157 loc) · 7.52 KB

File metadata and controls

239 lines (157 loc) · 7.52 KB

hostinger_api.VPSMalwareScannerApi

All URIs are relative to https://developers.hostinger.com

Method HTTP request Description
get_scan_metrics_v1 GET /api/vps/v1/virtual-machines/{virtualMachineId}/monarx Get scan metrics
install_monarx_v1 POST /api/vps/v1/virtual-machines/{virtualMachineId}/monarx Install Monarx
uninstall_monarx_v1 DELETE /api/vps/v1/virtual-machines/{virtualMachineId}/monarx Uninstall Monarx

get_scan_metrics_v1

VPSV1MalwareMetricsResource get_scan_metrics_v1(virtual_machine_id)

Get scan metrics

Retrieve scan metrics for the Monarx malware scanner installed on a specified virtual machine.

The scan metrics provide detailed information about malware scans performed by Monarx, including number of scans, detected threats, and other relevant statistics. This information is useful for monitoring security status of the virtual machine and assessing effectiveness of the malware scanner.

Use this endpoint to monitor VPS security scan results and threat detection.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.vpsv1_malware_metrics_resource import VPSV1MalwareMetricsResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.VPSMalwareScannerApi(api_client)
    virtual_machine_id = 1268054 # int | Virtual Machine ID

    try:
        # Get scan metrics
        api_response = api_instance.get_scan_metrics_v1(virtual_machine_id)
        print("The response of VPSMalwareScannerApi->get_scan_metrics_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VPSMalwareScannerApi->get_scan_metrics_v1: %s\n" % e)

Parameters

Name Type Description Notes
virtual_machine_id int Virtual Machine ID

Return type

VPSV1MalwareMetricsResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
422 Validation error response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

install_monarx_v1

VPSV1ActionActionResource install_monarx_v1(virtual_machine_id)

Install Monarx

Install the Monarx malware scanner on a specified virtual machine.

Monarx is a security tool designed to detect and prevent malware infections on virtual machines. By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.

Use this endpoint to enable malware protection on VPS instances.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.vpsv1_action_action_resource import VPSV1ActionActionResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.VPSMalwareScannerApi(api_client)
    virtual_machine_id = 1268054 # int | Virtual Machine ID

    try:
        # Install Monarx
        api_response = api_instance.install_monarx_v1(virtual_machine_id)
        print("The response of VPSMalwareScannerApi->install_monarx_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VPSMalwareScannerApi->install_monarx_v1: %s\n" % e)

Parameters

Name Type Description Notes
virtual_machine_id int Virtual Machine ID

Return type

VPSV1ActionActionResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
422 Validation error response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

uninstall_monarx_v1

VPSV1ActionActionResource uninstall_monarx_v1(virtual_machine_id)

Uninstall Monarx

Uninstall the Monarx malware scanner on a specified virtual machine.

If Monarx is not installed, the request will still be processed without any effect.

Use this endpoint to remove malware scanner from VPS instances.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.vpsv1_action_action_resource import VPSV1ActionActionResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.VPSMalwareScannerApi(api_client)
    virtual_machine_id = 1268054 # int | Virtual Machine ID

    try:
        # Uninstall Monarx
        api_response = api_instance.uninstall_monarx_v1(virtual_machine_id)
        print("The response of VPSMalwareScannerApi->uninstall_monarx_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VPSMalwareScannerApi->uninstall_monarx_v1: %s\n" % e)

Parameters

Name Type Description Notes
virtual_machine_id int Virtual Machine ID

Return type

VPSV1ActionActionResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
422 Validation error response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]