This reference topic provides information about the APIs used to register the NSX Distributed Malware Prevention service, retrieve the deployment specifications of the NSX Distributed Malware Prevention service, and delete a deployment specification of an existing NSX Distributed Malware Prevention service definition.

Register the NSX Distributed Malware Prevention Service

Use POST API to register the NSX Distributed Malware Prevention service. If the NSX Distributed Malware Prevention service is already registered, the API adds a new deployment specification to an existing service definition.

During service registration, the API internally creates the service definition of the NSX Distributed Malware Prevention service.

API Request

Method: POST

URI Path: napp/api/v1/malware-prevention/svm-spec

Request Headers: Not applicable

Query parameters: Not applicable

Table 1. Parameter List
Name Description Type Notes
deployment_spec_name

Name of the deployment specification. A service definition can contain multiple deployment specifications. Each deployment specification name must be unique.

String

Required

ovf_url

Complete path to the OVF file on the Web server.

String

Required

svm_version The version number of the service virtual machine.

String

Required

Example Request
POST https://{nsx-manager-ip}/napp/api/v1/malware-prevention/svm-spec
{
    "ovf_url" : "http://{webserver-ip}/{path-to-ovf-file}/{filename}.ovf",
    "deployment_spec_name" : "MPS_Distributed_1",
    "svm_version" : "3.2"
}
Example Response #1
Sample response when the POST API is used to register the NSX Distributed Malware Prevention service.
{
    "service_id": "5cd8d584-553e-4495-a112-04cdcf44064c",
    "display_name": "VMWare NSX Distributed Malware Prevention Service",
    "deployment_specs": {
        "_links": [],
        "results": [
            {
               "ovf_url": "http://{webserver-ip}/{path-to-ovf-file}/{filename}.ovf",
               "deployment_spec_name": "MPS_Distributed_1",
               "svm_version": "3.2"
            }
        ]
    }
}
}
Example Response #2
Sample response when the POST API is used to add a new service deployment specification to an existing service definition. In this case, the response lists all the deployment specifications of the service definition.

For example, if you want to upgrade the NSX Malware Prevention SVM in the service deployment of each ESXi host cluster, run this POST API to add a new service deployment specification to an existing service definition.

{
    "service_id": "5cd8d584-553e-4495-a112-04cdcf44064c",
    "display_name": "VMWare NSX Distributed Malware Prevention Service",
    "deployment_specs": {
        "_links": [],
        "results": [
            {
                "ovf_url": "http://{webserver-ip}/{path-to-ovf-file}/{filename2}.ovf",
                "deployment_spec_name": "MPS_Distributed_2",
                "svm_version": "3.3"
            },
            {
                "ovf_url": "http://{webserver-ip}/{path-to-ovf-file}/{filename1}.ovf",
                "deployment_spec_name": "MPS_Distributed_1",
                "svm_version": "3.2"
            }
        ]
    }
}

Retrieve the NSX Distributed Malware Prevention Service Deployment Specifications

Use GET API to retrieve the service deployment specifications of the NSX Distributed Malware Prevention service.

API Request

Method: GET

URI Path: napp/api/v1/malware-prevention/svm-spec

Request Headers: Not applicable

Query parameters: Not applicable

Request body: Not applicable

Example Response
{
    "service_id": "5cd8d584-553e-4495-a112-04cdcf44064c",
    "display_name": "VMWare NSX Distributed Malware Prevention Service",
    "deployment_specs": {
        "_links": [],
        "results": [
            {
               "ovf_url": "http://{webserver-ip}/{path-to-ovf-file}/{filename}.ovf",
               "deployment_spec_name": "MPS_Distributed_1",
               "svm_version": "3.2"
            }
        ]
    }
}
}

Delete the NSX Distributed Malware Prevention Service Deployment Specification

Use DELETE API to delete the NSX Distributed Malware Prevention service deployment specification only when you have added more than one deployment specification for the service definition, and one of the deployment specifications is no longer valid or used in any of the service deployments.

Caution: Do not use DELETE API in the following situations:
  • The NSX Distributed Malware Prevention service definition has only a single deployment specification.
  • The deployment specification is used in any of the service deployments.

In these two situations, DELETE API fails.

API Request

Method: DELETE

URI Path: napp/api/v1/malware-prevention/svm-spec

Request Headers: Not applicable

Query parameters: deployment_spec_name

Request Body: Not applicable

Example Request
DELETE  https://{nsx-manager-ip}/napp/api/v1/malware-prevention/svm-spec?deployment_spec_name=MPS_Distributed_1