Management Plane API > Security > Services > Service Insertion

Create a Service-Insertion Service

Creates new Service-Insertion Service in the system.

Request:

Method:
POST
URI Path(s):
/api/v1/serviceinsertion/services
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ServiceDefinition+

Example Request:

POST https://<nsx-mgr>/api/v1/serviceinsertion/services { "display_name": "NS Service for ABC partner", "description": "This service is inserted at T0 router and it provides advanced security", "attachment_point": [ "TIER0_LR" ], "functionalities": [ "NG_FW" ], "implementations": [ "NORTH_SOUTH" ], "transports": [ "L2_BRIDGE" ], "vendor_id": "ABC_Partner", "on_failure_policy": "ALLOW", "service_deployment_spec": { "deployment_specs": [{ "ovf_url": "http://server.com/dir1/ABC-Company-HA-OVF/ABC-VM-ESX-2.0.ovf", "name": "NS_DepSpec", "host_type": "ESXI", "service_form_factor": "MEDIUM" }], "nic_metadata_list": [ { "interface_label": "eth", "interface_index": 0, "interface_type": "MANAGEMENT" }, { "interface_label": "eth", "interface_index": 1, "interface_type": "DATA1" }, { "interface_label": "eth", "interface_index": 2, "interface_type": "DATA2" } ], "deployment_template": [{ "name": "NS_DepTemp", "attributes": [{ "attribute_type": "STRING", "display_name": "License", "key": "LicenseKey" }] }] } }

Successful Response:

Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
ServiceDefinition+

Example Response:

{ "resource_type": "ServiceDefinition", "description": "This service is inserted at T0 router and it provides advanced security", "id": "65a60890-6f48-418d-a7d5-5aaf65fc4e5b", "display_name": "NS Service for ABC partner", "attachment_point": [ "TIER0_LR" ], "transports": [ "L2_BRIDGE" ], "functionalities": [ "NG_FW" ], "vendor_id": "ABC_Partner", "on_failure_policy": "ALLOW", "service_deployment_spec": { "deployment_specs": [{ "ovf_url": "http://server.com/dir1/ABC-Company-HA-OVF/ABC-VM-ESX-2.0.ovf", "name": "NS_DepSpec", "host_type": "ESXI", "service_form_factor": "MEDIUM" }], "nic_metadata_list": [{ "interface_label": "eth", "interface_index": 2, "interface_type": "DATA2" }, { "interface_label": "eth", "interface_index": 0, "interface_type": "MANAGEMENT" }, { "interface_label": "eth", "interface_index": 1, "interface_type": "DATA1" } ], "deployment_template": [{ "name": "NS_DepTemp", "attributes": [{ "attribute_type": "STRING", "display_name": "License", "key": "LicnseKey" }] }] }, "implementations": [ "NORTH_SOUTH" ], "_create_user": "admin", "_create_time": 1525889017742, "_last_modified_user": "admin", "_last_modified_time": 1525889017742, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

service_insertion

Additional Errors: