Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 
ContentIndex
  
[+] Expand All
[-] Collapse All

Service Designer RESTful Web Services

The following operations can be performed using the Edge Services Director Service Designer RESTful Web Services.

Create ADC Templates

This request is used to create an ADC service template.

URI

/api/sgd/configmanager/servicetemplate/
createadcservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.createadcservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Creates an ADC service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "description" : "TEST_TEMPLATE DESC",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : {  },
  "serviceConfig" : { "clientFacing" : { "interfaces" : [ "irb.411",
              "irb.400"
            ],
          "name" : "CLIENT_FACING",
          "objectCreateType" : "TEMPLATE",
          "routingInstances" : [ "SGI-PRIVATE" ]
        },
      "customHealthChecks" : [ { "commandName" : "1",
            "commandType" : "UDP",
            "commands" : [ { "commandType" : "OPEN",
                  "depth" : "",
                  "name" : "1",
                  "offset" : "",
                  "value" : "1248",
                  "wait" : ""
                } ],
            "name" : "Script1",
            "objectCreateType" : "TEMPLATE"
          } ],
      "groups" : [ { "healthCheck" : false,
            "loadBalanceMethod" : "ROUND_ROBIN",
            "name" : "G1",
            "objectCreateType" : "TEMPLATE",
            "realservers" : [ "RS1" ],
            "unitHealthCheck" : 22
          } ],
      "msInterfaces" : [ { "name" : "ms-0/0/0",
            "objectCreateType" : "TEMPLATE"
          } ],
      "name" : "lb1",
      "realServers" : [ { "address" : "10.2.2.2",
            "name" : "RS1",
            "objectCreateType" : "TEMPLATE",
            "realServerHealthCheck" : { "failureRetries" : 1,
                "healthCheckInterval" : 0,
                "name" : "RS1",
                "recoveryRetries" : 1
              },
            "realServerType" : "ADC",
            "type" : "IPv4"
          } ],
      "serverFacing" : { "interfaces" : [ "irb.800",
              "irb.410"
            ],
          "name" : "SERVER_FACING",
          "objectCreateType" : "TEMPLATE",
          "routingInstances" : [ "SGI-PUBLIC" ]
        },
      "unitHealthChecks" : [ { "name" : 22,
            "objectCreateType" : "TEMPLATE",
            "units" : [ { "address" : "10.3.33.3",
                  "name" : "IPv4-Name",
                  "type" : "IPv4"
                } ]
          } ],
      "virtualServers" : [ { "address" : "10.4.4.4",
            "description" : "VS1 Desc",
            "name" : "VS1",
            "objectCreateType" : "TEMPLATE",
            "type" : "IPv4",
            "virtualServices" : [ { "fastLoadBalancing" : true,
                  "group" : "G1",
                  "name" : "VSvc1",
                  "perPacketLoadBalancing" : true,
                  "port" : "",
                  "protocol" : "UDP",
                  "sendTrafficToVIP" : true,
                  "serverListeningPort" : "2",
                  "serviceTimeOut" : "2",
                  "type" : "DNS"
                } ]
          } ]
    },
  "status" : "UNPUBLISHED",
  "uiPermissionMap" : { "ADC_CLIENT_FACING" : "DEVICE_SPECIFIC",
      "ADC_CUSTOM_HEALTH_CHECKS" : "EDITABLE",
      "ADC_HEALTH_CHECK_SOURCES" : "EDITABLE",
      "ADC_REAL_SERVERS" : "EDITABLE",
      "ADC_SERVER_FACING" : "DEVICE_SPECIFIC",
      "ADC_SERVER_GROUPS" : "EDITABLE",
      "ADC_SERVICE_INTERFACES" : "DEVICE_SPECIFIC",
      "ADC_VIRTUAL_SERVERS" : "EDITABLE"
    }
}

Import ADC Templates

This request is used to import an ADC service template.

URI

/api/sgd/configmanager/servicetemplate/
prepareservicestructurefromhost

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromhost
+json;version=1;charset=UTF-8

Consumes

None

Produces

Imports an ADC service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "serviceTemplateInput" : { "deviceId" : "131093",
      "instanceName" : "lb1",
      "serviceType" : "ADC"
    } }

Modify ADC Templates

This request is used to modify an ADC service template.

URI

/api/sgd/configmanager/servicetemplate/
modifyadcservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.modifyadcservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Modifies an ADC service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "description" : "TEST_TEMPLATE DESC NEW",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : {  },
  "serviceConfig" : { "clientFacing" : { "interfaces" : [ "irb.411",
              "irb.400"
            ],
          "name" : "CLIENT_FACING",
          "objectCreateType" : "TEMPLATE",
          "routingInstances" : [ "SGI-PRIVATE" ]
        },
      "customHealthChecks" : [ { "commandName" : "1",
            "commandType" : "UDP",
            "commands" : [ { "commandType" : "OPEN",
                  "createdBy" : "super",
                  "createdTime" : 1416203326000,
                  "depth" : null,
                  "description" : null,
                  "id" : 592268,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416203326000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCCommandEntity:592268",
                  "name" : "1",
                  "objectCreateType" : null,
                  "offset" : null,
                  "userOperationType" : null,
                  "value" : "1248",
                  "wait" : null
                } ],
            "createdBy" : "super",
            "createdTime" : 1416203326000,
            "description" : null,
            "id" : 592267,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203326000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCCustomHealthCheckEntity:592267",
            "name" : "Script1",
            "objectCreateType" : "TEMPLATE",
            "userOperationType" : null
          } ],
      "groups" : [ { "createdBy" : "super",
            "createdTime" : 1416203326000,
            "description" : null,
            "groupHealthCheck" : null,
            "healthCheck" : false,
            "id" : 592271,
            "loadBalanceMethod" : "ROUND_ROBIN",
            "modifiedBy" : "super",
            "modifiedTime" : 1416203326000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCGroupEntity:592271",
            "name" : "G1",
            "objectCreateType" : "TEMPLATE",
            "realservers" : [ "RS1" ],
            "unitHealthCheck" : "22",
            "userOperationType" : null
          } ],
      "msInterfaces" : [ { "createdBy" : "super",
            "createdTime" : 1416203326000,
            "description" : null,
            "id" : 592274,
            "interfaceName" : null,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203326000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.SDGHostInterfaceEntity:592274",
            "name" : "ms-0/0/0",
            "objectCreateType" : "TEMPLATE",
            "unitNames" : null,
            "userOperationType" : null
          } ],
      "name" : "lb1",
      "realServers" : [ { "address" : "10.2.2.21",
            "name" : "RS1",
            "objectCreateType" : "TEMPLATE",
            "realServerHealthCheck" : { "failureRetries" : 1,
                "healthCheckInterval" : 0,
                "name" : "RS1",
                "recoveryRetries" : 1
              },
            "realServerType" : "ADC",
            "type" : "IPv4"
          } ],
      "serverFacing" : { "interfaces" : [ "irb.800",
              "irb.410"
            ],
          "name" : "SERVER_FACING",
          "objectCreateType" : "TEMPLATE",
          "routingInstances" : [ "SGI-PUBLIC" ]
        },
      "unitHealthChecks" : [ { "createdBy" : "super",
            "createdTime" : 1416203326000,
            "description" : null,
            "id" : 592269,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203326000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCUnitHealthCheckEntity:592269",
            "name" : "22",
            "objectCreateType" : "TEMPLATE",
            "units" : [ { "address" : "10.3.33.3",
                  "createdBy" : "super",
                  "createdTime" : 1416203326000,
                  "description" : null,
                  "id" : 592270,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416203326000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCUnitEntity:592270",
                  "name" : "IPv4-Name",
                  "objectCreateType" : null,
                  "type" : "IPv4",
                  "userOperationType" : null
                } ],
            "userOperationType" : null
          } ],
      "virtualServers" : [ { "address" : "10.4.4.4",
            "createdBy" : "super",
            "createdTime" : 1416203326000,
            "description" : "VS1 Desc",
            "id" : 592275,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203326000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServerEntity:592275",
            "name" : "VS1",
            "objectCreateType" : "TEMPLATE",
            "type" : "IPv4",
            "userOperationType" : null,
            "virtualServices" : [ { "createdBy" : "super",
                  "createdTime" : 1416203326000,
                  "description" : null,
                  "fastLoadBalancing" : true,
                  "group" : "G1",
                  "id" : 592276,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416203326000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServiceEntity:592276",
                  "name" : "VSvc1",
                  "objectCreateType" : null,
                  "perPacketLoadBalancing" : true,
                  "port" : null,
                  "protocol" : "UDP",
                  "sendTrafficToVIP" : true,
                  "serverListeningPort" : 2,
                  "serviceTimeOut" : 2,
                  "type" : "DNS",
                  "userOperationType" : null
                } ]
          } ]
    },
  "status" : "UNPUBLISHED",
  "uiPermissionMap" : { "ADC_CLIENT_FACING" : "DEVICE_SPECIFIC",
      "ADC_CUSTOM_HEALTH_CHECKS" : "EDITABLE",
      "ADC_HEALTH_CHECK_SOURCES" : "EDITABLE",
      "ADC_REAL_SERVERS" : "EDITABLE",
      "ADC_SERVER_FACING" : "DEVICE_SPECIFIC",
      "ADC_SERVER_GROUPS" : "EDITABLE",
      "ADC_SERVICE_INTERFACES" : "DEVICE_SPECIFIC",
      "ADC_VIRTUAL_SERVERS" : "EDITABLE"
    }
}

Delete ADC Templates

This request is used to delete an ADC service template.

URI

/api/sgd/configmanager/servicetemplate/
deleteservicetemplatebynames/ADC

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.deleteservicetemplatebynames.ADC
+json;version=1;charset=UTF-8

Consumes

None

Produces

Deletes an ADC service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{"teampleteNames":["Test_Template"]}

Get All ADC Templates By Type

This request is used to retrieve all the configured ADC service templates by their types.

URI

/api/sgd/configmanager/servicetemplate/
getallservicetemplatesbytype/ADC

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallservicetemplatesbytype.ADC
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured ADC templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the ADC service templates by types

Output

Sample JSON Output

{ "response" : { "data" : [ { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.ADCTemplateEntity:67190",
            "createdBy" : "super",
            "createdTime" : "2014-11-13T13:33:16+05:30",
            "description" : "",
            "id" : 67190,
            "modifiedBy" : "super",
            "modifiedTime" : "2014-11-13T13:33:16+05:30",
            "name" : "dsdsdsdsd",
            "status" : "PUBLISHED"
          },
          { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.ADCTemplateEntity:591728",
            "createdBy" : "super",
            "createdTime" : "2014-11-17T10:41:12+05:30",
            "description" : "Test_Template Description",
            "id" : 591728,
            "modifiedBy" : "super",
            "modifiedTime" : "2014-11-17T10:41:12+05:30",
            "name" : "Test_Template",
            "status" : "PUBLISHED"
          }
        ],
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 2
    } }

Get ADC Template Details

This request is used to prepare an ADC service structure from a template.

URI

/api/sgd/configmanager/servicetemplate/
/prepareservicestructurefromtemplate/TEST_TEMPLATE/
ADC

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromtemplate.TEST_TEMPLATE.ADC
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects an ADC template details

Response Status Code

Message

Description

200 OK

Successful collection of the ADC service template details

Output

Sample JSON Output

{
    "response":{
        "id":592277,
        "MOID":"net.juniper.jmp.sgd.configmanager.template.jpa.ADCTemplateEntity:592277",
        "createdBy":"super",
        "modifiedBy":"super",
        "createdTime":"2014-11-17T11:18:46+05:30",
        "modifiedTime":"2014-11-17T11:19:59+05:30",
        "to":{
            "configViewComponentsTOs":[
                {
                    "configViewComponentList":{
                        "name":"RS1",
                        "configKnob":"real-servers",
                        "truncatedName":"RS1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/real_server.png",
                        "paretPanel":"real-servers",
                        "configData":"{\"id\":592287,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"
name\":\"RS1\",\"description\":null,\"objectCreateType\":\"TEMPLATE\",\"type\":\"IPv4\",\"address\":\"10.2.2.21\",\"realServerHealthCheck\":{\"id\":592286,\"createdBy\":\"super\",\"modifiedB

y\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"RS1\",\"description\":null,\"objectCreateType\":null,\"failureRetries\":
1,\"healthCheckInterval\":0,\"recoveryRetries\":1,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.RealServerHealthCheckEntity_$$_javassist_494:592286\"},\"realServerTy
pe\":\"ADC\",\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.RealServerEntity:592287\"}", "description":"" }, "name":"Real Servers", "type":"ADC_REAL_SERVERS", "permissionType":"EDITABLE", "description":"Configure application servers" }, { "configViewComponentList":{ "name":22, "configKnob":"health-check-source", "truncatedName":22, "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/health_check.png", "paretPanel":"health-check-source", "configData":"{\"id\":592283,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\" name\":\"22\",\"description\":null,\"objectCreateType\":\"TEMPLATE\",\"units\":[{\"id\":592284,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTi me\":1416203399000,\"userOperationType\":null,\"name\":\"IPv4-Name\",\"description\":null,\"objectCreateType\":null,\"type\":\"IPv4\",\"address\":\"10.3.33.3\",\"moid\":\"net.juniper.jmp.sg d.configmanager.config.jpa.adc.ADCUnitEntity:592284\"}],\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCUnitHealthCheckEntity:592283\"}", "description":"" }, "name":"Health Check Sources", "type":"ADC_HEALTH_CHECK_SOURCES", "permissionType":"EDITABLE", "description":"Configure IP address to send the health checks to real servers" }, { "configViewComponentList":{ "name":"Script1", "configKnob":"custom-health-check", "truncatedName":"Script1", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/custom_health_check.png", "paretPanel":"custom-health-check", "configData":"{\"id\":592281,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"
name\":\"Script1\",\"description\":null,\"objectCreateType\":\"TEMPLATE\",\"commandType\":\"UDP\",\"commandName\":\"1\",\"commands\":[{\"id\":592282,\"createdBy\":\"super\",\"modifie
dBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"1\",\"description\":null,\"objectCreateType\":null,\"commandType\"

:\"OPEN\",\"value\":\"1248\",\"wait\":null,\"offset\":null,\"depth\":null,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCCommandEntity:592282\"}],\"moid\":\"net.juniper.jmp.s
gd.configmanager.config.jpa.adc.ADCCustomHealthCheckEntity:592281\"}", "description":"" }, "name":"Custom Health Checks", "type":"ADC_CUSTOM_HEALTH_CHECKS", "permissionType":"EDITABLE", "description":"Configure script based health check for a group" }, { "configViewComponentList":{ "name":"G1", "configKnob":"server-groups", "truncatedName":"G1", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/server_group.png", "paretPanel":"server-groups", "configData":"{\"id\":592285,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"
name\":\"G1\",\"description\":null,\"objectCreateType\":\"TEMPLATE\",\"realservers\":[\"RS1\"],\"unitHealthCheck\":\"22\",\"loadBalanceMethod\":\"ROUND_ROBIN\",\"healthCheck\":false,\"g
roupHealthCheck\":null,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCGroupEntity:592285\"}", "description":"" }, "name":"Server Groups", "type":"ADC_SERVER_GROUPS", "permissionType":"EDITABLE", "description":"Associate multiple servers with same content type to one group" }, { "configViewComponentList":{ "name":"VS1", "configKnob":"virtual-servers", "truncatedName":"VS1", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/virtual_server.png", "paretPanel":"virtual-servers", "configData":"{\"id\":592289,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"
name\":\"VS1\",\"description\":\"VS1 Desc\",\"objectCreateType\":\"TEMPLATE\",\"address\":\"10.4.4.4\",\"type\":\"IPv4\",\"virtualServices\":[{\"id\":592290,\"createdBy\":\"super\",\"modifiedB
y\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"VSvc1\",\"description\":null,\"objectCreateType\":null,\"group\":\"G1\"
,\"type\":\"DNS\",\"protocol\":\"UDP\",\"serviceTimeOut\":2,\"port\":null,\"serverListeningPort\":2,\"fastLoadBalancing\":true,\"perPacketLoadBalancing\":true,\"sendTrafficToVIP\":true,\"moid\
":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServiceEntity:592290\"}],\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServerEntity:592289\"}", "description":"" }, "name":"Virtual Servers", "type":"ADC_VIRTUAL_SERVERS", "permissionType":"EDITABLE", "description":"Create Virtual IP address to accept client requests" }, { "configViewComponentList":[ { "name":"SGI-PRIVATE", "configKnob":"client-side-vrf", "truncatedName":"SGI-PRIV..", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/client_facing.png", "paretPanel":"client-side-vrf", "type":"ROUTINGINSTANCES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"SGI-PRIVATE\",\"description
\":null,\"objectCreateType\":null,\"moid\":null}", "description":"" }, { "name":"irb.411", "configKnob":"client-facing-interfaces", "truncatedName":"irb.411", "labelAlign":"bottom", "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png", "paretPanel":"client-facing-interfaces", "type":"INTERFACES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"irb.411\",\"description\":nul
l,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"moid\":null}", "description":"" }, { "name":"irb.400", "configKnob":"client-facing-interfaces", "truncatedName":"irb.400", "labelAlign":"bottom", "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png", "paretPanel":"client-facing-interfaces", "type":"INTERFACES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"irb.400\",\"description\":nul
l,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"moid\":null}", "description":"" } ], "name":"Client Facing", "type":"ADC_CLIENT_FACING", "permissionType":"DEVICE_SPECIFIC", "description":"Create interface to receive client traffic" }, { "configViewComponentList":{ "name":"ms-0\/0\/0", "configKnob":"ms-interfaces", "truncatedName":"ms-0\/0\/0", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/service_pic.png", "paretPanel":"ms-interfaces", "configData":"{\"id\":592288,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"
name\":\"ms-0\/0\/0\",\"description\":null,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.SDGHostInte
rfaceEntity:592288\"}", "description":"" }, "name":"Service Pic", "type":"ADC_SERVICE_INTERFACES", "permissionType":"DEVICE_SPECIFIC", "description":"Select MS interface for hosting the service" }, { "configViewComponentList":[ { "name":"SGI-PUBLIC", "configKnob":"server-side-vrf", "truncatedName":"SGI-PUBL..", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/server_facing.png", "paretPanel":"server-side-vrf", "type":"ROUTINGINSTANCES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"SGI-PUBLIC\",\"description\"
:null,\"objectCreateType\":null,\"moid\":null}", "description":"" }, { "name":"irb.800", "configKnob":"service-facing-interfaces", "truncatedName":"irb.800", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png", "paretPanel":"service-facing-interfaces", "type":"INTERFACES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"irb.800\",\"description\":nul
l,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"moid\":null}", "description":"" }, { "name":"irb.410", "configKnob":"service-facing-interfaces", "truncatedName":"irb.410", "labelAlign":"right", "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png", "paretPanel":"service-facing-interfaces", "type":"INTERFACES", "configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":\"irb.410\",\"description\":nul
l,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"moid\":null}", "description":"" } ], "name":"Server Facing", "type":"ADC_SERVER_FACING", "permissionType":"DEVICE_SPECIFIC", "description":"Create interface to connect application servers" } ], "noOfPanels":10 }, "serviceType":"ADC", "serviceInstanceName":"lb1", "name":"TEST_TEMPLATE", "description":"TEST_TEMPLATE DESC NEW", "status":"PUBLISHED", "uiPermissionMap":{ "entry":[ { "key":"ADC_CLIENT_FACING", "value":"DEVICE_SPECIFIC" }, { "key":"ADC_VIRTUAL_SERVERS", "value":"EDITABLE" }, { "key":"ADC_SERVER_FACING", "value":"DEVICE_SPECIFIC" }, { "key":"ADC_HEALTH_CHECK_SOURCES", "value":"EDITABLE" }, { "key":"ADC_SERVICE_INTERFACES", "value":"DEVICE_SPECIFIC" }, { "key":"ADC_SERVER_GROUPS", "value":"EDITABLE" }, { "key":"ADC_REAL_SERVERS", "value":"EDITABLE" }, { "key":"ADC_CUSTOM_HEALTH_CHECKS", "value":"EDITABLE" } ] } } }

Get All Published ADC Templates

This request is used to retrieve all the published ADC service templates.

URI

/api/sgd/configmanager/servicetemplate/
getallpublishedservicetemplatesbytype/ADC

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallpublishedservicetemplatesbytype.ADC
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the published ADC templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the published ADC service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.ADCTemplateEntity:592277",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T11:18:46+05:30",
          "description" : "TEST_TEMPLATE DESC NEW",
          "id" : 592277,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T11:19:59+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "PUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 0
    } }

Get All ADC Template Structures By Type

This request is used to retrieve all the configured ADC service template structures by their types. The configuration details are displayed in property view and configuration view. The property view is useful if you want a GUI, tree-based structure of display. In this view, you can drill-down the tree and view data about each of the service attributes. Property view is simple view of configuration as key value pair. The dynamic fields in form view are defined using parameters. The configuration view is beneficial if you are familiar with the CLI interface structure and want to view service attributes in the form of configuration stanzas and hierarchy levels.

URI

/api/sgd/configmanager/servicetemplate/
getservicetemplatestruturebytype/ADC
?osVersion={osVersion(12.1/14.1)}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getservicetemplatestruturebytype.ADC
?osVersion={osVersion(12.1/14.1)}
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured ADC template structures by type

Response Status Code

Message

Description

200 OK

Successful collection of the ADC service template structures by types

Output

Sample JSON Output

{ "response" : { "serviceInstanceName" : "",
      "serviceType" : "ADC",
      "to" : { "configViewComponentsTOs" : [ { "description" : "Configure application servers",
                "name" : "Real Servers",
                "permissionType" : "EDITABLE",
                "type" : "ADC_REAL_SERVERS"
              },
              { "description" : "Configure IP address to send the health checks to real servers",
                "name" : "Health Check Sources",
                "permissionType" : "EDITABLE",
                "type" : "ADC_HEALTH_CHECK_SOURCES"
              },
              { "description" : "Configure script based health check for a group",
                "name" : "Custom Health Checks",
                "permissionType" : "EDITABLE",
                "type" : "ADC_CUSTOM_HEALTH_CHECKS"
              },
              { "description" : "Associate multiple servers with same content type to one group",
                "name" : "Server Groups",
                "permissionType" : "EDITABLE",
                "type" : "ADC_SERVER_GROUPS"
              },
              { "description" : "Create Virtual IP address to accept client requests",
                "name" : "Virtual Servers",
                "permissionType" : "EDITABLE",
                "type" : "ADC_VIRTUAL_SERVERS"
              },
              { "description" : "Create interface to receive client traffic",
                "name" : "Client Facing",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "ADC_CLIENT_FACING"
              },
              { "description" : "Select MS interface for hosting the service",
                "name" : "Service Pic",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "ADC_SERVICE_INTERFACES"
              },
              { "description" : "Create interface to connect application servers",
                "name" : "Server Facing",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "ADC_SERVER_FACING"
              }
            ],
          "noOfPanels" : 10
        }
    } }

Create TLB Templates

This request is used to create a TLB service template.

URI

/api/sgd/configmanager/servicetemplate/
createtlbservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.createtlbservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Creates a TLB service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "description" : "TEST_TEMPLATE DESC",
  "name" : "TEST_TEMPLATE",
  "networkMonitorings" : [ { "failureRetries" : "1",
        "name" : "NW_M_P",
        "networkMonitoringProtocol" : "ICMP",
        "objectCreateType" : "TEMPLATE",
        "probeInterval" : "1",
        "recoveryRetries" : "1"
      } ],
  "objectBuilderImportComponentListMap" : {  },
  "serviceConfig" : { "groups" : [ { "name" : "G1",
            "networkMonitorings" : [ "NW_M_P" ],
            "objectCreateType" : "TEMPLATE",
            "realservers" : [ "RS1" ]
          } ],
      "msInterfaces" : [ { "name" : "ms-0/0/0.0",
            "objectCreateType" : "TEMPLATE"
          } ],
      "name" : "tlb",
      "realServers" : [ { "address" : "10.5.5.5",
            "name" : "RS1",
            "objectCreateType" : "TEMPLATE",
            "realServerType" : "TLB",
            "type" : "IPv4"
          } ],
      "virtualServices" : [ { "address" : "10.3.3.3",
            "group" : "G1",
            "loadBalanceMethod" : [ "SOURCEIP" ],
            "name" : "VS1",
            "objectCreateType" : "TEMPLATE",
            "rebalanceThreshold" : "1",
            "routeMetric" : "1"
          } ]
    },
  "status" : "UNPUBLISHED",
  "uiPermissionMap" : { "TLB_NETWORK_MONITORING" : "EDITABLE",
      "TLB_REAL_SERVERS" : "EDITABLE",
      "TLB_SERVER_GROUPS" : "EDITABLE",
      "TLB_SERVICE_INTERFACES" : "DEVICE_SPECIFIC",
      "TLB_VIRTUAL_SERVERS" : "EDITABLE"
    }
}

Import TLB Templates

This request is used to import an TLB service template.

URI

/api/sgd/configmanager/servicetemplate/
prepareservicestructurefromhost?osVersion=14.1

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromhost
?osVersion=14.1
+json;version=1;charset=UTF-8

Consumes

None

Produces

Imports an TLB service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "serviceTemplateInput" : { "deviceId" : "131093",
      "instanceName" : "tlb_sdg",
      "serviceType" : "TLB"
    } }

Modify TLB Templates

This request is used to modify a TLB service template.

URI

/api/sgd/configmanager/servicetemplate/
modifytlbservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.modifytlbservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Modifies a TLB service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "description" : "TEST_TEMPLATE DESC NEW",
  "name" : "TEST_TEMPLATE",
  "networkMonitorings" : [ { "createdBy" : "super",
        "createdTime" : 1416203795000,
        "description" : null,
        "failureRetries" : "1",
        "id" : 592293,
        "modifiedBy" : "super",
        "modifiedTime" : 1416203795000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.tlb.NetworkMonitoringEntity:592293",
        "name" : "NW_M_P",
        "networkMonitoringProtocol" : "ICMP",
        "objectCreateType" : "TEMPLATE",
        "paramValueMap" : null,
        "probeInterval" : "1",
        "recoveryRetries" : "1",
        "userOperationType" : null
      } ],
  "objectBuilderImportComponentListMap" : {  },
  "serviceConfig" : { "groups" : [ { "createdBy" : "super",
            "createdTime" : 1416203795000,
            "description" : null,
            "id" : 592292,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203795000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.tlb.TLBGroupEntity:592292",
            "name" : "G1",
            "networkMonitorings" : [ "NW_M_P" ],
            "objectCreateType" : "TEMPLATE",
            "realservers" : [ "RS1" ],
            "routingInstance" : null,
            "userOperationType" : null
          } ],
      "msInterfaces" : [ { "createdBy" : "super",
            "createdTime" : 1416203795000,
            "description" : null,
            "id" : 592294,
            "interfaceName" : null,
            "modifiedBy" : "super",
            "modifiedTime" : 1416203795000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.SDGHostInterfaceEntity:592294",
            "name" : "ms-0/0/0.0",
            "objectCreateType" : "TEMPLATE",
            "unitNames" : null,
            "userOperationType" : null
          } ],
      "name" : "tlb",
      "realServers" : [ { "address" : "10.6.6.6",
            "name" : "RS1",
            "objectCreateType" : "TEMPLATE",
            "realServerType" : "TLB",
            "type" : "IPv4"
          } ],
      "virtualServices" : [ { "address" : "10.3.3.3",
            "createdBy" : null,
            "createdTime" : null,
            "description" : null,
            "group" : "G1",
            "id" : null,
            "loadBalanceMethod" : [ "SOURCEIP" ],
            "modifiedBy" : null,
            "modifiedTime" : null,
            "moid" : null,
            "name" : "VS1",
            "objectCreateType" : "TEMPLATE",
            "rebalanceThreshold" : 1,
            "routeMetric" : 1,
            "routingInstance" : null,
            "userOperationType" : null
          } ]
    },
  "status" : "UNPUBLISHED",
  "uiPermissionMap" : { "TLB_NETWORK_MONITORING" : "EDITABLE",
      "TLB_REAL_SERVERS" : "EDITABLE",
      "TLB_SERVER_GROUPS" : "EDITABLE",
      "TLB_SERVICE_INTERFACES" : "DEVICE_SPECIFIC",
      "TLB_VIRTUAL_SERVERS" : "EDITABLE"
    }
}

Delete TLB Templates

This request is used to delete a TLB service template.

URI

/api/sgd/configmanager/servicetemplate/
deleteservicetemplatebynames/TLB

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.deleteservicetemplatebynames.TLB
+json;version=1;charset=UTF-8

Consumes

None

Produces

Deletes a TLB service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{"teampleteNames":["Test_Template"]}

Get All TLB Templates By Type

This request is used to retrieve all the configured TLB service templates by their types.

URI

/api/sgd/configmanager/servicetemplate/
getallservicetemplatesbytype/TLB

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallservicetemplatesbytype.TLB
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured TLB templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the TLB service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.TLBTemplateEntity:592297",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T11:26:35+05:30",
          "description" : "TEST_TEMPLATE DESC",
          "id" : 592297,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T11:26:35+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "UNPUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 1
    } }

Get TLB Template Details

This request is used to prepare a TLB service structure from a template.

URI

/api/sgd/configmanager/servicetemplate/
/prepareservicestructurefromtemplate/
TEST_TEMPLATE/TLB

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromtemplate.
TEST_TEMPLATE.TLB
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects a TLB template details

Response Status Code

Message

Description

200 OK

Successful collection of the TLB service template details

Output

Sample JSON Output

{ 
    "response":{ 
        "id":592277,
        "MOID":"net.juniper.jmp.sgd.configmanager.template.jpa.ADCTemplateEntity:592277",
        "createdBy":"super",
        "modifiedBy":"super",
        "createdTime":"2014-11-17T11:18:46+05:30",
        "modifiedTime":"2014-11-17T11:19:59+05:30",
        "to":{ 
            "configViewComponentsTOs":[ 
                { 
                    "configViewComponentList":{ 
                        "name":"RS1",
                        "configKnob":"real-servers",
                        "truncatedName":"RS1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/real_server.png",
                        "paretPanel":"real-servers",
                        
"configData":"{\"id\":592287,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"RS1\",\"descriptio
n\":null,\"objectCreateType\":\"TEMPLATE\",\"type\":\"IPv4\",\"address\":\"10.2.2.21\",\"realServerHea
lthCheck\":{\"id\":592286,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162033
99000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"RS1\",\"description\":
null,\"objectCreateType\":null,\"failureRetries\":1,\"healthCheckInterval\":0,\"recoveryRetries\":1,\"mo
id\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.RealServerHealthCheckEntity_$$_javassist
_494:592286\"},\"realServerType\":\"ADC\",\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.c
ommon.RealServerEntity:592287\"}",
                        "description":""
                    },
                    "name":"Real Servers",
                    "type":"ADC_REAL_SERVERS",
                    "permissionType":"EDITABLE",
                    "description":"Configure application servers"
                },
                { 
                    "configViewComponentList":{ 
                        "name":22,
                        "configKnob":"health-check-source",
                        "truncatedName":22,
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/health_check.png",
                        "paretPanel":"health-check-source",
                        
"configData":"{\"id\":592283,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"22\",\"description
\":null,\"objectCreateType\":\"TEMPLATE\",\"units\":[{\"id\":592284,\"createdBy\":\"super\",\"modifie
dBy\":\"super\",\"createdTime\":1416203399000,\"modifiedTime\":1416203399000,\"userOperationTy
pe\":null,\"name\":\"IPv4-
Name\",\"description\":null,\"objectCreateType\":null,\"type\":\"IPv4\",\"address\":\"10.3.33.3\",\"moi
d\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCUnitEntity:592284\"}],\"moid\":\"net.junipe
r.jmp.sgd.configmanager.config.jpa.adc.ADCUnitHealthCheckEntity:592283\"}",
                        "description":""
                    },
                    "name":"Health Check Sources",
                    "type":"ADC_HEALTH_CHECK_SOURCES",
                    "permissionType":"EDITABLE",
                    "description":"Configure IP address to send the health checks to real servers"
                },
                { 
                    "configViewComponentList":{ 
                        "name":"Script1",
                        "configKnob":"custom-health-check",
                        "truncatedName":"Script1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/custom_health_check.png",
                        "paretPanel":"custom-health-check",
                        
"configData":"{\"id\":592281,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"Script1\",\"descri
ption\":null,\"objectCreateType\":\"TEMPLATE\",\"commandType\":\"UDP\",\"commandName\":\"1\",
\"commands\":[{\"id\":592282,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416
203399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"1\",\"description
\":null,\"objectCreateType\":null,\"commandType\":\"OPEN\",\"value\":\"1248\",\"wait\":null,\"offset\
":null,\"depth\":null,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCCommandEntity:
592282\"}],\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCCustomHealthCheckEntity:
592281\"}",
                        "description":""
                    },
                    "name":"Custom Health Checks",
                    "type":"ADC_CUSTOM_HEALTH_CHECKS",
                    "permissionType":"EDITABLE",
                    "description":"Configure script based health check for a group"
                },
                { 
                    "configViewComponentList":{ 
                        "name":"G1",
                        "configKnob":"server-groups",
                        "truncatedName":"G1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/server_group.png",
                        "paretPanel":"server-groups",
                        
"configData":"{\"id\":592285,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"G1\",\"description
\":null,\"objectCreateType\":\"TEMPLATE\",\"realservers\":[\"RS1\"],\"unitHealthCheck\":\"22\",\"load
BalanceMethod\":\"ROUND_ROBIN\",\"healthCheck\":false,\"groupHealthCheck\":null,\"moid\":\"net.j
uniper.jmp.sgd.configmanager.config.jpa.adc.ADCGroupEntity:592285\"}",
                        "description":""
                    },
                    "name":"Server Groups",
                    "type":"ADC_SERVER_GROUPS",
                    "permissionType":"EDITABLE",
                    "description":"Associate multiple servers with same content type to one group"
                },
                { 
                    "configViewComponentList":{ 
                        "name":"VS1",
                        "configKnob":"virtual-servers",
                        "truncatedName":"VS1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/virtual_server.png",
                        "paretPanel":"virtual-servers",
                        
"configData":"{\"id\":592289,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"VS1\",\"descriptio
n\":\"VS1 
Desc\",\"objectCreateType\":\"TEMPLATE\",\"address\":\"10.4.4.4\",\"type\":\"IPv4\",\"virtualServices\"
:[{\"id\":592290,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416203399000,\"
modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"VSvc1\",\"description\":null,\"
objectCreateType\":null,\"group\":\"G1\",\"type\":\"DNS\",\"protocol\":\"UDP\",\"serviceTimeOut\":2,
\"port\":null,\"serverListeningPort\":2,\"fastLoadBalancing\":true,\"perPacketLoadBalancing\":true,\"se
ndTrafficToVIP\":true,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServiceEn
tity:592290\"}],\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.adc.ADCVirtualServerEntity:59
2289\"}",
                        "description":""
                    },
                    "name":"Virtual Servers",
                    "type":"ADC_VIRTUAL_SERVERS",
                    "permissionType":"EDITABLE",
                    "description":"Create Virtual IP address to accept client requests"
                },
                { 
                    "configViewComponentList":[ 
                        { 
                            "name":"SGI-PRIVATE",
                            "configKnob":"client-side-vrf",
                            "truncatedName":"SGI-PRIV..",
                            "labelAlign":"right",
                            "image":"\/sgdui\/web\/images\/viewconfig\/client_facing.png",
                            "paretPanel":"client-side-vrf",
                            "type":"ROUTINGINSTANCES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"SGI-
PRIVATE\",\"description\":null,\"objectCreateType\":null,\"moid\":null}",
                            "description":""
                        },
                        { 
                            "name":"irb.411",
                            "configKnob":"client-facing-interfaces",
                            "truncatedName":"irb.411",
                            "labelAlign":"bottom",
                            "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png",
                            "paretPanel":"client-facing-interfaces",
                            "type":"INTERFACES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"irb.411\",\"description\":null,\"objectCreateType\":null,\"i
nterfaceName\":null,\"unitNames\":null,\"moid\":null}",
                            "description":""
                        },
                        { 
                            "name":"irb.400",
                            "configKnob":"client-facing-interfaces",
                            "truncatedName":"irb.400",
                            "labelAlign":"bottom",
                            "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png",
                            "paretPanel":"client-facing-interfaces",
                            "type":"INTERFACES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"irb.400\",\"description\":null,\"objectCreateType\":null,\"i
nterfaceName\":null,\"unitNames\":null,\"moid\":null}",
                            "description":""
                        }
                    ],
                    "name":"Client Facing",
                    "type":"ADC_CLIENT_FACING",
                    "permissionType":"DEVICE_SPECIFIC",
                    "description":"Create interface to receive client traffic"
                },
                { 
                    "configViewComponentList":{ 
                        "name":"ms-0\/0\/0",
                        "configKnob":"ms-interfaces",
                        "truncatedName":"ms-0\/0\/0",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/service_pic.png",
                        "paretPanel":"ms-interfaces",
                        
"configData":"{\"id\":592288,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
03399000,\"modifiedTime\":1416203399000,\"userOperationType\":null,\"name\":\"ms-
0\/0\/0\",\"description\":null,\"objectCreateType\":null,\"interfaceName\":null,\"unitNames\":null,\"m
oid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.SDGHostInterfaceEntity:592288\"}",
                        "description":""
                    },
                    "name":"Service Pic",
                    "type":"ADC_SERVICE_INTERFACES",
                    "permissionType":"DEVICE_SPECIFIC",
                    "description":"Select MS interface for hosting the service"
                },
                { 
                    "configViewComponentList":[ 
                        { 
                            "name":"SGI-PUBLIC",
                            "configKnob":"server-side-vrf",
                            "truncatedName":"SGI-PUBL..",
                            "labelAlign":"right",
                            "image":"\/sgdui\/web\/images\/viewconfig\/server_facing.png",
                            "paretPanel":"server-side-vrf",
                            "type":"ROUTINGINSTANCES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"SGI-
PUBLIC\",\"description\":null,\"objectCreateType\":null,\"moid\":null}",
                            "description":""
                        },
                        { 
                            "name":"irb.800",
                            "configKnob":"service-facing-interfaces",
                            "truncatedName":"irb.800",
                            "labelAlign":"right",
                            "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png",
                            "paretPanel":"service-facing-interfaces",
                            "type":"INTERFACES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"irb.800\",\"description\":null,\"objectCreateType\":null,\"i
nterfaceName\":null,\"unitNames\":null,\"moid\":null}",
                            "description":""
                        },
                        { 
                            "name":"irb.410",
                            "configKnob":"service-facing-interfaces",
                            "truncatedName":"irb.410",
                            "labelAlign":"right",
                            "image":"\/sgdui\/web\/images\/viewconfig\/IRB_interface.png",
                            "paretPanel":"service-facing-interfaces",
                            "type":"INTERFACES",
                            
"configData":"{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\"
:null,\"userOperationType\":null,\"name\":\"irb.410\",\"description\":null,\"objectCreateType\":null,\"i
nterfaceName\":null,\"unitNames\":null,\"moid\":null}",
                            "description":""
                        }
                    ],
                    "name":"Server Facing",
                    "type":"ADC_SERVER_FACING",
                    "permissionType":"DEVICE_SPECIFIC",
                    "description":"Create interface to connect application servers"
                }
            ],
            "noOfPanels":10
        },
        "serviceType":"ADC",
        "serviceInstanceName":"lb1",
        "name":"TEST_TEMPLATE",
        "description":"TEST_TEMPLATE DESC NEW",
        "status":"PUBLISHED",
        "uiPermissionMap":{ 
            "entry":[ 
                { 
                    "key":"ADC_CLIENT_FACING",
                    "value":"DEVICE_SPECIFIC"
                },
                { 
                    "key":"ADC_VIRTUAL_SERVERS",
                    "value":"EDITABLE"
                },
                { 
                    "key":"ADC_SERVER_FACING",
                    "value":"DEVICE_SPECIFIC"
                },
                { 
                    "key":"ADC_HEALTH_CHECK_SOURCES",
                    "value":"EDITABLE"
                },
                { 
                    "key":"ADC_SERVICE_INTERFACES",
                    "value":"DEVICE_SPECIFIC"
                },
                { 
                    "key":"ADC_SERVER_GROUPS",
                    "value":"EDITABLE"
                },
                { 
                    "key":"ADC_REAL_SERVERS",
                    "value":"EDITABLE"
                },
                { 
                    "key":"ADC_CUSTOM_HEALTH_CHECKS",
                    "value":"EDITABLE"
                }
            ]
        }
    }
}

Get All Published TLB Templates

This request is used to retrieve all the published TLB service templates.

URI

/api/sgd/configmanager/servicetemplate/
getallpublishedservicetemplatesbytype/TLB

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallpublishedservicetemplatesbytype.TLB
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the published TLB templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the published TLB service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.TLBTemplateEntity:592297",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T11:26:35+05:30",
          "description" : "TEST_TEMPLATE DESC NEW",
          "id" : 592297,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T11:29:24+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "PUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 0
    } }

Get All TLB Template Structures By Type

This request is used to retrieve all the configured TLB service template structures by their types. The configuration details are displayed in property view and configuration view. The property view is useful if you want a GUI, tree-based structure of display. In this view, you can drill-down the tree and view data about each of the service attributes. Property view is simple view of configuration as key value pair. The dynamic fields in form view are defined using parameters. The configuration view is beneficial if you are familiar with the CLI interface structure and want to view service attributes in the form of configuration stanzas and hierarchy levels.

URI

/api/sgd/configmanager/servicetemplate/
getservicetemplatestruturebytype/TLB
?osVersion={osVersion(12.1/14.1)}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getservicetemplatestruturebytype.TLB
?osVersion={osVersion(12.1/14.1)}
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured TLB template structures by type

Response Status Code

Message

Description

200 OK

Successful collection of the TLB service template structures by types

Output

Sample JSON Output

{ "response" : { "serviceInstanceName" : "",
      "serviceType" : "TLB",
      "to" : { "configViewComponentsTOs" : [ { "description" : "Configure application servers",
                "name" : "Real Servers",
                "permissionType" : "EDITABLE",
                "type" : "TLB_REAL_SERVERS"
              },
              { "description" : "Configure Health check protocol",
                "name" : "Network Monitoring Profiles",
                "permissionType" : "EDITABLE",
                "type" : "TLB_NETWORK_MONITORING"
              },
              { "description" : "Associate multiple servers with same content to one group",
                "name" : "Server Groups",
                "permissionType" : "EDITABLE",
                "type" : "TLB_SERVER_GROUPS"
              },
              { "description" : "Create Virtual IP address to accept client requests",
                "name" : "Virtual Services",
                "permissionType" : "EDITABLE",
                "type" : "TLB_VIRTUAL_SERVERS"
              },
              { "description" : "Select MS interface for hosting the service",
                "name" : "Service Pics",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "TLB_SERVICE_INTERFACES"
              }
            ],
          "noOfPanels" : 10
        }
    } }

Create SFW Templates

This request is used to create a SFW service template.

URI

/api/sgd/configmanager/servicetemplate/
createsfwservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.createsfwservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Creates a SFW service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "applicationSets" : [ { "applications" : [ "junos-sip",
            "junos-dns-tcp",
            "junos-dns-udp",
            "junos-ftp",
            "junos-http",
            "junos-https",
            "junos-rtsp",
            "junos-pptp",
            "junos-tftp",
            "P2P_ID-CDX",
            "P2P_ID-CommNAT",
            "P2P_Data-Exch",
            "Yahoo_Push",
            "Mobile_Me",
            "ANDROID_NOTIF",
            "TCP-ALL",
            "UDP-ALL",
            "cust-junos-rtsp"
          ],
        "createdBy" : "super",
        "createdTime" : 1416206303000,
        "defaultApplicationSet" : false,
        "description" : null,
        "id" : 592736,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206303000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationSetEntity:592736",
        "name" : "SDG-APPS",
        "objectCreateType" : "TEMPLATE",
        "userOperationType" : null
      } ],
  "applications" : [ { "applicationProtocol" : "SHELL",
        "createdBy" : null,
        "createdTime" : 1416196136000,
        "defaultApplication" : true,
        "description" : null,
        "destinationPort" : { "createdBy" : null,
            "createdTime" : 1416196136000,
            "description" : null,
            "hiPort" : null,
            "id" : 589841,
            "lowPort" : null,
            "modifiedBy" : null,
            "modifiedTime" : 1416196136000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.PortEntity:589841",
            "name" : "514",
            "objectCreateType" : null,
            "portNo" : 514,
            "portType" : "SINGLE",
            "userOperationType" : null
          },
        "icmpType" : null,
        "id" : 589840,
        "inactivityTimeout" : null,
        "modifiedBy" : null,
        "modifiedTime" : 1416196136000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationEntity:589840",
        "name" : "junos-rsh",
        "objectCreateType" : "TEMPLATE",
        "protocol" : "TCP",
        "sourcePort" : null,
        "userOperationType" : null
      } ],
  "description" : "TEST_TEMPLATE DESC",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : { "APPLICATIONS" : [ "junos-rsh" ],
      "APPLICATION_SETS" : [ "SDG-APPS" ],
      "SFW_RULES" : [ "sfw-policy-abc1" ]
    },
  "serviceSets" : [ { "insideServiceInterface" : "sp-1/0/0.0",
        "name" : "Set1",
        "objectCreateType" : "TEMPLATE",
        "outsideServiceInterface" : "sp-1/0/0.100",
        "replicateServices" : { "name" : "RepService",
            "nat" : false,
            "statefulFirewall" : false
          },
        "sfwRuleSets" : [ "dsdsd" ],
        "sfwRules" : [ "sfw-policy-abc1" ],
        "sysLogName" : ""
      } ],
  "sfwRuleSets" : [ { "name" : "dsdsd",
        "objectCreateType" : "TEMPLATE",
        "sfwRules" : [ "sfw-policy-abc1" ]
      } ],
  "sfwRules" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206310000,
        "description" : null,
        "hostName" : null,
        "hostNames" : null,
        "id" : 593378,
        "idString" : null,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "matchDirection" : "INPUT",
        "modifiedBy" : "super",
        "modifiedTime" : 1416206310000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWRuleEntity:593378",
        "name" : "sfw-policy-abc1",
        "objectCreateType" : "TEMPLATE",
        "ruleSets" : null,
        "sdgName" : null,
        "serviceSets" : null,
        "sfwTerms" : [ { "applicationSets" : [ "APP_ABC",
                  "SDG-APPS",
                  "APP_SET_ABC"
                ],
              "applications" : [ "TCLos-bgp" ],
              "createdBy" : "super",
              "createdTime" : 1416206310000,
              "description" : null,
              "destPortEndVal" : 199,
              "destPortStartVal" : 100,
              "destinationAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206310000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593380,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206310000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593380",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "hostName" : null,
              "id" : 593379,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206310000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWTermEntity:593379",
              "name" : "term-t1",
              "objectCreateType" : null,
              "outcome" : "ACCEPT",
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "HOST",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206310000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593384,
                    "ipAddress" : "10.8.8.10",
                    "ipFamily" : "IPv4",
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : null,
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206310000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593384",
                    "name" : "10.8.8.10/32",
                    "netmask" : 32,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  },
                  { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206310000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593385,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.6/32",
                        "10.165.49.208/28",
                        "10.165.58.128/25",
                        "10.2.1.3/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206310000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593385",
                    "name" : "abcd",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  }
                ],
              "userOperationType" : null
            } ],
        "userOperationType" : null
      } ],
  "status" : "PUBLISHED",
  "syslogs" : [ { "facilityOverride" : "AUTHORIZATION",
        "ipAddress" : "SYSLOG1",
        "logPrefix" : "2",
        "name" : "SYSLOG1",
        "objectCreateType" : "TEMPLATE",
        "port" : "2",
        "sessionLogsClose" : false,
        "sessionLogsOpen" : false,
        "syslogClassType" : [ "SESSION_LOGS" ],
        "syslogServiceType" : "ALERT"
      } ],
  "uiPermissionMap" : { "APPLICATIONS" : "EDITABLE",
      "APPLICATION_SETS" : "EDITABLE",
      "SERVICE_SETS" : "DEVICE_SPECIFIC",
      "SFW_RULES" : "EDITABLE",
      "SFW_RULE_SETS" : "EDITABLE",
      "SYSLOGS" : "EDITABLE"
    }
}

Import SFW Templates

This request is used to import an SFW service template.

URI

/api/sgd/configmanager/servicetemplate/
prepareservicestructurefromhost?osVersion=14.1

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromhost
?osVersion=14.1
+json;version=1;charset=UTF-8

Consumes

None

Produces

Imports an SFW service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "serviceTemplateInput" : { "deviceId" : "131093",
      "instanceName" : "IPv6-SFW",
      "serviceType" : "SFW"
    } }

Modify SFW Templates

This request is used to modify an SFW service template.

URI

/api/sgd/configmanager/servicetemplate/
modifysfwservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.modifysfwservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Modifies an SFW service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "applicationSets" : [ { "applications" : [ "junos-sip",
            "junos-dns-tcp",
            "junos-dns-udp",
            "junos-ftp",
            "junos-http",
            "junos-https",
            "junos-rtsp",
            "junos-pptp",
            "junos-tftp",
            "P2P_ID-CDX",
            "P2P_ID-CommNAT",
            "P2P_Data-Exch",
            "Yahoo_Push",
            "Mobile_Me",
            "ANDROID_NOTIF",
            "TCP-ALL",
            "UDP-ALL",
            "cust-junos-rtsp"
          ],
        "createdBy" : "super",
        "createdTime" : 1416206831000,
        "defaultApplicationSet" : false,
        "description" : null,
        "id" : 593515,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206831000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationSetEntity:593515",
        "name" : "SDG-APPS",
        "objectCreateType" : "TEMPLATE",
        "userOperationType" : null
      } ],
  "applications" : [ { "applicationProtocol" : "SHELL",
        "createdBy" : "super",
        "createdTime" : 1416206831000,
        "defaultApplication" : true,
        "description" : null,
        "destinationPort" : { "createdBy" : "super",
            "createdTime" : 1416206831000,
            "description" : null,
            "hiPort" : null,
            "id" : 593534,
            "lowPort" : null,
            "modifiedBy" : "super",
            "modifiedTime" : 1416206831000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.PortEntity:593534",
            "name" : "514",
            "objectCreateType" : null,
            "portNo" : 514,
            "portType" : "SINGLE",
            "userOperationType" : null
          },
        "icmpType" : null,
        "id" : 593535,
        "inactivityTimeout" : null,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206831000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationEntity:593535",
        "name" : "junos-rsh",
        "objectCreateType" : "TEMPLATE",
        "protocol" : "TCP",
        "sourcePort" : null,
        "userOperationType" : null
      } ],
  "description" : "TEST_TEMPLATE DESC NEW",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : {  },
  "serviceSets" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206831000,
        "description" : null,
        "id" : 593537,
        "insideServiceInterface" : "sp-1/0/0.0",
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206831000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.serviceset.ServiceSetEntity:593537",
        "name" : "Set1",
        "natRuleSets" : null,
        "natRules" : null,
        "objectCreateType" : "TEMPLATE",
        "outsideServiceInterface" : "sp-1/0/0.100",
        "replicateServices" : { "createdBy" : null,
            "createdTime" : null,
            "description" : null,
            "id" : null,
            "modifiedBy" : null,
            "modifiedTime" : null,
            "moid" : null,
            "name" : null,
            "nat" : false,
            "objectCreateType" : null,
            "replicationThreshold" : null,
            "statefulFirewall" : false,
            "userOperationType" : null
          },
        "sfwRuleSets" : [ "dsdsd" ],
        "sfwRules" : [ "sfw-policy-abc1" ],
        "sysLogName" : null,
        "syslogConfig" : null,
        "userOperationType" : null
      } ],
  "sfwRuleSets" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206831000,
        "description" : null,
        "id" : 593538,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206831000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWRuleSetEntity:593538",
        "name" : "dsdsd",
        "objectCreateType" : "TEMPLATE",
        "sfwRules" : [ "sfw-policy-abc1" ],
        "userOperationType" : null
      } ],
  "sfwRules" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206831000,
        "description" : null,
        "hostName" : null,
        "hostNames" : null,
        "id" : 593539,
        "idString" : null,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "matchDirection" : "INPUT",
        "modifiedBy" : "super",
        "modifiedTime" : 1416206831000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWRuleEntity:593539",
        "name" : "sfw-policy-abc1",
        "objectCreateType" : "TEMPLATE",
        "ruleSets" : null,
        "sdgName" : null,
        "serviceSets" : null,
        "sfwTerms" : [ { "applicationSets" : [ "APP_ABC",
                  "SDG-APPS",
                  "APP_SET_ABC"
                ],
              "applications" : [ "TCLos-bgp" ],
              "createdBy" : "super",
              "createdTime" : 1416206831000,
              "description" : null,
              "destPortEndVal" : 199,
              "destPortStartVal" : 100,
              "destinationAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206831000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593541,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206831000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593541",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "hostName" : null,
              "id" : 593540,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206831000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWTermEntity:593540",
              "name" : "term-t1",
              "objectCreateType" : null,
              "outcome" : "ACCEPT",
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "HOST",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206831000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593545,
                    "ipAddress" : "10.8.8.10",
                    "ipFamily" : "IPv4",
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : null,
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206831000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593545",
                    "name" : "10.8.8.10/32",
                    "netmask" : 32,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  },
                  { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206831000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 593546,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.6/32",
                        "10.165.49.208/28",
                        "10.165.58.128/25",
                        "10.2.1.3/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206831000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593546",
                    "name" : "abcd",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  }
                ],
              "userOperationType" : null
            } ],
        "userOperationType" : null
      } ],
  "status" : "PUBLISHED",
  "syslogs" : [ { "facilityOverride" : "AUTHORIZATION",
        "ipAddress" : "SYSLOG1",
        "logPrefix" : "222",
        "name" : "SYSLOG1",
        "objectCreateType" : "TEMPLATE",
        "port" : "2222",
        "sessionLogsClose" : false,
        "sessionLogsOpen" : false,
        "syslogClassType" : [ "PACKET_LOGS",
            "STATEFUL_FIREWALL_LOGS",
            "NAT_LOGS",
            "ALG_LOGS",
            "SESSION_LOGS"
          ],
        "syslogServiceType" : "ALERT"
      } ],
  "uiPermissionMap" : { "APPLICATIONS" : "EDITABLE",
      "APPLICATION_SETS" : "EDITABLE",
      "SERVICE_SETS" : "DEVICE_SPECIFIC",
      "SFW_RULES" : "EDITABLE",
      "SFW_RULE_SETS" : "EDITABLE",
      "SYSLOGS" : "EDITABLE"
    }
}

Delete SFW Templates

This request is used to delete a SFW service template.

URI

/api/sgd/configmanager/servicetemplate/
deleteservicetemplatebynames/SFW

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.deleteservicetemplatebynames.SFW
+json;version=1;charset=UTF-8

Consumes

None

Produces

Deletes a SFW service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{"teampleteNames":["Test_Template"]}

Get All SFW Templates By Type

This request is used to retrieve all the configured SFW service templates by their types.

URI

/api/sgd/configmanager/servicetemplate/
getallservicetemplatesbytype/SFW

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallservicetemplatesbytype.SFW
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured SFW templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the SFW service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.SFWTemplateEntity:593514",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T12:17:11+05:30",
          "description" : "TEST_TEMPLATE DESC",
          "id" : 593514,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T12:17:11+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "PUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 1
    } }

Get SFW Template Details

This request is used to prepare an SFW service structure from a template.

URI

/api/sgd/configmanager/servicetemplate/
/prepareservicestructurefromtemplate/
TEST_TEMPLATE/SFW

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromtemplate.
TEST_TEMPLATE.SFW
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects an SFW template details

Response Status Code

Message

Description

200 OK

Successful collection of the SFW service template details

Output

Sample JSON Output

{
    "response":{
        "id":593514,
        "MOID":"net.juniper.jmp.sgd.configmanager.template.jpa.SFWTemplateEntity:593514",
        "createdBy":"super",
        "modifiedBy":"super",
        "createdTime":"2014-11-17T12:17:11+05:30",
        "modifiedTime":"2014-11-17T12:17:11+05:30",
        "to":{
            "configViewComponentsTOs":[
                {
                    "configViewComponentList":{
                        "name":"junos-rsh",
                        "configKnob":"applications",
                        "truncatedName":"junos-rs..",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/applications.png",
                        "paretPanel":"applications",
                        
"configData":"{\"id\":593535,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
06831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"name\":\"junos-
rsh\",\"description\":null,\"objectCreateType\":null,\"protocol\":\"TCP\",\"applicationProtocol\":\"SHEL
L\",\"sourcePort\":null,\"destinationPort\":{\"id\":593534,\"createdBy\":\"super\",\"modifiedBy\":\"su
per\",\"createdTime\":1416206831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\
"name\":\"514\",\"description\":null,\"objectCreateType\":null,\"portNo\":514,\"hiPort\":null,\"lowPor
t\":null,\"portType\":\"SINGLE\",\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.Port
Entity:593534\"},\"inactivityTimeout\":null,\"icmpType\":null,\"defaultApplication\":true,\"moid\":\"ne
t.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationEntity:593535\"}",
                        "description":""
                    },
                    "name":"Application",
                    "type":"APPLICATIONS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Applications"
                },
                {
                    "configViewComponentList":{
                        "name":"SDG-APPS",
                        "configKnob":"application-sets",
                        "truncatedName":"SDG-APPS",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/app_rule_set.png",
                        "paretPanel":"application-sets",
                        
"configData":"{\"id\":593515,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
06831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"name\":\"SDG-
APPS\",\"description\":null,\"objectCreateType\":null,\"applications\":[\"junos-sip\",\"junos-dns-
tcp\",\"junos-dns-udp\",\"junos-ftp\",\"junos-http\",\"junos-https\",\"junos-rtsp\",\"junos-
pptp\",\"junos-tftp\",\"P2P_ID-CDX\",\"P2P_ID-CommNAT\",\"P2P_Data-
Exch\",\"Yahoo_Push\",\"Mobile_Me\",\"ANDROID_NOTIF\",\"TCP-ALL\",\"UDP-ALL\",\"cust-junos-
rtsp\"],\"defaultApplicationSet\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.commo
n.ApplicationSetEntity:593515\"}",
                        "description":""
                    },
                    "name":"Application Sets",
                    "type":"APPLICATION_SETS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Group of Applications to form application-set"
                },
                {
                    "configViewComponentList":{
                        "name":"SYSLOG1",
                        "configKnob":"syslogs",
                        "truncatedName":"SYSLOG1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/sys_log.png",
                        "paretPanel":"syslogs",
                        
"configData":"{\"id\":593551,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":null,\"
modifiedTime\":null,\"userOperationType\":null,\"name\":\"SYSLOG1\",\"description\":null,\"objectCre
ateType\":null,\"ipAddress\":\"SYSLOG1\",\"facilityOverride\":\"AUTHORIZATION\",\"logPrefix\":\"2\",\
"syslogServiceType\":\"ALERT\",\"syslogClassType\":[\"SESSION_LOGS\"],\"sessionLogsOpen\":false,\"s
essionLogsClose\":false,\"port\":2,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.serviceset.S
yslogEntity:593551\"}",
                        "description":""
                    },
                    "name":"Syslogs",
                    "type":"SYSLOGS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Syslog Properties"
                },
                {
                    "configViewComponentList":{
                        "name":"sfw-policy-abc1",
                        "configKnob":"statefull-firewall-rules",
                        "truncatedName":"sfw-poli..",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/sfw_rule.png",
                        "paretPanel":"statefull-firewall-rules",
                        
"configData":"{\"id\":593539,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
06831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"
name\":\"sfw-policy-
abc1\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"locke
dAt\":null,\"matchDirection\":\"INPUT\",\"sfwTerms\":[{\"id\":593540,
\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416206831000,\"modifiedTime\":1
416206831000,\"userOperationType\":null,\"name\":\"term-t1\",\"description\":null,\"obj
ectCreateType\":null,\"hostName\":null,\"ruleId\":null,\"applicationSets\":[\"APP_ABC\",\"SDG-
APPS\",\"APP_SET_ABC\"],\"applications\":[\"TCLos-bgp\"],\"destinationAddresses\":[{\"id\":5935
41,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":1416206831000,\"modifiedTime\
":1416206831000,\"userOperationType\":null,\"name\":\"add_abc_group1\",\"descripti
on\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"addre
ssType\":\"GROUP\",\"hiIp\":null,\"lowIp\":null,\"ipAddress\":null,\"ipFamily\":null,\"mem
bers\":[\"10.1.1.1\/32\",\"10.1.1.11\/32\",\"10.1.1.12\/32\"],\"groups\":null,\"netmask\":0,\"locked\":false
,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:59354
1\"}],\"sourceAddresses\":[{\"id\":593545,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdT
ime\":1416206831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"n
ame\":\"10.8.8.10\/32\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"locke
dBy\":null,\"lockedAt\":null,\"addressType\":\"HOST\",\"hiIp\":null,\"lowIp\":null,\"ipAddr
ess\":\"10.8.8.10\",\"ipFamily\":\"IPv4\",\"members\":null,\"groups\":null,\"netmask\":32,\"locked\":fa
lse,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593
545\"},{\"id\":593546,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162068310
00,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"name\":\"abcd\",\"d
escription\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,
\"addressType\":\"GROUP\",\"hiIp\":null,\"lowIp\":null,\"ipAddress\":null,\"ipFamily\":null
,\"members\":[\"10.1.1.6\/32\",\"10.165.49.208\/28\",\"10.165.58.128\/25\",\"10.2.1.3\/32\"],\"g
roups\":null,\"netmask\":0,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanag
er.config.jpa.common.AddressEntity:593546\"}],\"destPortStartVal\":100,\"destPortEndVal\":199,\"out
come\":\"ACCEPT\",\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWTerm
Entity:593540\"}],\"sdgName\":null,\"hostNames\":null,\"serviceSets\":null,\"ruleSets\":null,\"idString\
":null,\"hostName\":null,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.sfw.S
FWRuleEntity:593539\"}",
                        "description":""
                    },
                    "name":"SFW Rules",
                    "type":"SFW_RULES",
                    "permissionType":"EDITABLE",
                    "description":"Configure SFW Rule for address translation"
                },
                {
                    "configViewComponentList":{
                        "name":"dsdsd",
                        "configKnob":"statefull-firewall-rule-sets",
                        "truncatedName":"dsdsd",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/sfw_rule_set.png",
                        "paretPanel":"statefull-firewall-rule-sets",
                        
"configData":"{\"id\":593538,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
06831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"name\":\"dsdsd\",\"descript
ion\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"sfwR
ules\":[\"sfw-policy-
abc1\"],\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.sfw.SFWRuleSetEntity
:593538\"}",
                        "description":""
                    },
                    "name":"SFW Rule Sets",
                    "type":"SFW_RULE_SETS",
                    "permissionType":"EDITABLE",
                    "description":"Configure group of Rules to form Rule-set"
                },
                {
                    "configViewComponentList":{
                        "name":"Set1",
                        "configKnob":"service-sets",
                        "truncatedName":"Set1",
                        "labelAlign":"right",
                        "image":"\/sgdui\/web\/images\/viewconfig\/service_set.png",
                        "paretPanel":"service-sets",
                        
"configData":"{\"id\":593537,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162
06831000,\"modifiedTime\":1416206831000,\"userOperationType\":null,\"name\":\"Set1\",\"descripti
on\":null,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"natRu
les\":null,\"sfwRules\":[\"sfw-policy-
abc1\"],\"natRuleSets\":null,\"sfwRuleSets\":[\"dsdsd\"],\"insideServiceInterface\":\"sp-
1\/0\/0.0\",\"outsideServiceInterface\":\"sp-
1\/0\/0.100\",\"sysLogName\":null,\"syslogConfig\":null,\"replicateServices\":{\"id\":null,\"createdBy\":
null,\"modifiedBy\":null,\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":null,\"name
\":null,\"description\":null,\"objectCreateType\":null,\"replicationThreshold\":null,\"nat\":false,\"statef
ulFirewall\":false,\"moid\":null},\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.j
pa.serviceset.ServiceSetEntity:593537\"}",
                        "description":""
                    },
                    "name":"Service Sets",
                    "type":"SERVICE_SETS",
                    "permissionType":"DEVICE_SPECIFIC",
                    "description":"Configure Service-set to apply Service"
                }
            ],
            "noOfPanels":3
        },
        "serviceType":"SFW",
        "name":"TEST_TEMPLATE",
        "description":"TEST_TEMPLATE DESC",
        "status":"PUBLISHED",
        "uiPermissionMap":{
            "entry":[
                {
                    "key":"SFW_RULE_SETS",
                    "value":"EDITABLE"
                },
                {
                    "key":"APPLICATIONS",
                    "value":"EDITABLE"
                },
                {
                    "key":"SERVICE_SETS",
                    "value":"DEVICE_SPECIFIC"
                },
                {
                    "key":"APPLICATION_SETS",
                    "value":"EDITABLE"
                },
                {
                    "key":"SFW_RULES",
                    "value":"EDITABLE"
                },
                {
                    "key":"SYSLOGS",
                    "value":"EDITABLE"
                }
            ]
        }
    }
}

Get All Published SFW Templates

This request is used to retrieve all the published SFW service templates.

URI

/api/sgd/configmanager/servicetemplate/
getallpublishedservicetemplatesbytype/SFW

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallpublishedservicetemplatesbytype.SFW
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the published SFW templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the published SFW service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.SFWTemplateEntity:593514",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T12:17:11+05:30",
          "description" : "TEST_TEMPLATE DESC NEW",
          "id" : 593514,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T12:18:58+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "PUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 0
    } }

Get All SFW Template Structures By Type

This request is used to retrieve all the configured SFW service template structures by their types. The configuration details are displayed in property view and configuration view. The property view is useful if you want a GUI, tree-based structure of display. In this view, you can drill-down the tree and view data about each of the service attributes. Property view is simple view of configuration as key value pair. The dynamic fields in form view are defined using parameters. The configuration view is beneficial if you are familiar with the CLI interface structure and want to view service attributes in the form of configuration stanzas and hierarchy levels.

URI

/api/sgd/configmanager/servicetemplate/
getservicetemplatestruturebytype/SFW
?osVersion={osVersion(12.1/14.1)}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getservicetemplatestruturebytype.SFW
?osVersion={osVersion(12.1/14.1)}
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured SFW template structures by type

Response Status Code

Message

Description

200 OK

Successful collection of the SFW service template structures by types

Output

Sample JSON Output

{ "response" : { "serviceInstanceName" : "",
      "serviceType" : "SFW",
      "to" : { "configViewComponentsTOs" : [ { "description" : "Configure Applications",
                "name" : "Application",
                "permissionType" : "EDITABLE",
                "type" : "APPLICATIONS"
              },
              { "description" : "Configure Group of Applications to form application-set",
                "name" : "Application Sets",
                "permissionType" : "EDITABLE",
                "type" : "APPLICATION_SETS"
              },
              { "description" : "Configure Syslog Properties",
                "name" : "Syslogs",
                "permissionType" : "EDITABLE",
                "type" : "SYSLOGS"
              },
              { "description" : "Configure SFW Rule for address translation",
                "name" : "SFW Rules",
                "permissionType" : "EDITABLE",
                "type" : "SFW_RULES"
              },
              { "description" : "Configure group of Rules to form Rule-set",
                "name" : "SFW Rule Sets",
                "permissionType" : "EDITABLE",
                "type" : "SFW_RULE_SETS"
              },
              { "description" : "Configure Service-set to apply Service",
                "name" : "Service Sets",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "SERVICE_SETS"
              }
            ],
          "noOfPanels" : 3
        }
    } }

Create CGNAT Templates

This request is used to create a CGNAT service template.

URI

/api/sgd/configmanager/servicetemplate/
createcgnatservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.createcgnatservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Creates a CGNAT service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "applicationSets" : [ { "applications" : [ "junos-ftp",
            "junos-tftp",
            "junos-rpc-portmap-tcp",
            "junos-rpc-portmap-udp",
            "junos-snmp-get",
            "junos-snmp-get-next",
            "junos-snmp-response",
            "junos-snmp-trap",
            "junos-rexec",
            "junos-rlogin",
            "junos-rsh",
            "junos-rtsp",
            "junos-citrix-winframe",
            "junos-citrix-winframe-udp",
            "junos-sqlnet",
            "junos-h323",
            "junos-iiop-java",
            "junos-iiop-orbix",
            "junos-realaudio",
            "junos-traceroute",
            "junos-rpc-services-udp",
            "junos-rpc-services-tcp",
            "junos-icmp-all",
            "junos-netshow",
            "junos-netbios-name-udp",
            "junos-netbios-datagram",
            "junos-dce-rpc-portmap",
            "junos-dcerpc-msexchange-directory-rfr",
            "junos-dcerpc-msexchange-information-store",
            "junos-dcerpc-msexchange-directory-nsp",
            "junos-sip"
          ],
        "createdBy" : null,
        "createdTime" : 1416196136000,
        "defaultApplicationSet" : true,
        "description" : null,
        "id" : 589980,
        "modifiedBy" : null,
        "modifiedTime" : 1416196136000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationSetEntity:589980",
        "name" : "junos-algs-outbound",
        "objectCreateType" : "TEMPLATE",
        "userOperationType" : null
      } ],
  "applications" : [ { "applicationProtocol" : "IP",
        "createdBy" : null,
        "createdTime" : 1416196136000,
        "defaultApplication" : true,
        "description" : null,
        "destinationPort" : null,
        "icmpType" : null,
        "id" : 589850,
        "inactivityTimeout" : null,
        "modifiedBy" : null,
        "modifiedTime" : 1416196136000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationEntity:589850",
        "name" : "junos-ip",
        "objectCreateType" : "TEMPLATE",
        "protocol" : null,
        "sourcePort" : null,
        "userOperationType" : null
      } ],
  "cgnatPools" : [ { "address" : [ { "addressType" : "RANGE",
              "configEditStatus" : null,
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "groups" : null,
              "hiIp" : "192.168.75.250",
              "id" : 592756,
              "ipAddress" : null,
              "ipFamily" : "IPv4",
              "locked" : false,
              "lockedAt" : null,
              "lockedBy" : null,
              "lowIp" : "192.168.75.0",
              "members" : null,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
              "name" : "192.168.75.0-192.168.75.250",
              "netmask" : 0,
              "objectCreateType" : null,
              "userOperationType" : null
            } ],
        "autoPortAllocation" : { "auto" : true,
            "createdBy" : "super",
            "createdTime" : 1416206309000,
            "description" : null,
            "id" : 592752,
            "modifiedBy" : "super",
            "modifiedTime" : 1416206309000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
            "name" : "napt44-SS1-p1",
            "objectCreateType" : null,
            "randomAllocation" : true,
            "userOperationType" : null
          },
        "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206309000,
        "description" : null,
        "id" : 592753,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206309000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
        "name" : "napt44-SS1-p1",
        "objectCreateType" : "TEMPLATE",
        "roundRobin" : true,
        "userOperationType" : null
      } ],
  "cgnatRuleSets" : [ { "cgnatRules" : [ "napt44-SS1-r1" ],
        "name" : "RuleSet",
        "objectCreateType" : "TEMPLATE"
      } ],
  "cgnatRules" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206309000,
        "description" : null,
        "hostName" : null,
        "hostNames" : null,
        "id" : 592778,
        "idString" : null,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "matchDirection" : "INPUT",
        "modifiedBy" : "super",
        "modifiedTime" : 1416206309000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATRuleEntity:592778",
        "name" : "napt44-SS1-r1",
        "natTerms" : [ { "addressPooling" : "PAIRED",
              "applicationSets" : [ "APP_ABC",
                  "APP_SET_ABC"
                ],
              "applications" : [ "test12" ],
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "destPortEndVal" : null,
              "destPortStartVal" : null,
              "destinationAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592780,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592780",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "destinationPool" : null,
              "hostName" : null,
              "id" : 592779,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEntity:592779",
              "name" : "t1",
              "objectCreateType" : null,
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592784,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592784",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "sourcePool" : { "address" : [ { "addressType" : "RANGE",
                        "configEditStatus" : null,
                        "createdBy" : "super",
                        "createdTime" : 1416206309000,
                        "description" : null,
                        "groups" : null,
                        "hiIp" : "192.168.75.250",
                        "id" : 592756,
                        "ipAddress" : null,
                        "ipFamily" : "IPv4",
                        "locked" : false,
                        "lockedAt" : null,
                        "lockedBy" : null,
                        "lowIp" : "192.168.75.0",
                        "members" : null,
                        "modifiedBy" : "super",
                        "modifiedTime" : 1416206309000,
                        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
                        "name" : "192.168.75.0-192.168.75.250",
                        "netmask" : 0,
                        "objectCreateType" : null,
                        "userOperationType" : null
                      } ],
                  "autoPortAllocation" : { "auto" : true,
                      "createdBy" : "super",
                      "createdTime" : 1416206309000,
                      "description" : null,
                      "id" : 592752,
                      "modifiedBy" : "super",
                      "modifiedTime" : 1416206309000,
                      "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
                      "name" : "napt44-SS1-p1",
                      "objectCreateType" : null,
                      "randomAllocation" : true,
                      "userOperationType" : null
                    },
                  "configEditStatus" : null,
                  "createdBy" : "super",
                  "createdTime" : 1416206309000,
                  "description" : null,
                  "id" : 592753,
                  "locked" : false,
                  "lockedAt" : null,
                  "lockedBy" : null,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416206309000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
                  "name" : "napt44-SS1-p1",
                  "objectCreateType" : "OBJECTBUILDER",
                  "roundRobin" : true,
                  "userOperationType" : null
                },
              "syslog" : false,
              "translationType" : "NAPT_44",
              "userOperationType" : null
            },
            { "addressPooling" : "PAIRED",
              "applicationSets" : [  ],
              "applications" : [  ],
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "destPortEndVal" : null,
              "destPortStartVal" : null,
              "destinationAddresses" : null,
              "destinationPool" : null,
              "hostName" : null,
              "id" : 592788,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEntity:592788",
              "name" : "t2",
              "objectCreateType" : null,
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "HOST",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592789,
                    "ipAddress" : "any-unicast",
                    "ipFamily" : "IPv4",
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : null,
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592789",
                    "name" : "any-unicast",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "sourcePool" : { "address" : [ { "addressType" : "RANGE",
                        "configEditStatus" : null,
                        "createdBy" : "super",
                        "createdTime" : 1416206309000,
                        "description" : null,
                        "groups" : null,
                        "hiIp" : "192.168.75.250",
                        "id" : 592756,
                        "ipAddress" : null,
                        "ipFamily" : "IPv4",
                        "locked" : false,
                        "lockedAt" : null,
                        "lockedBy" : null,
                        "lowIp" : "192.168.75.0",
                        "members" : null,
                        "modifiedBy" : "super",
                        "modifiedTime" : 1416206309000,
                        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
                        "name" : "192.168.75.0-192.168.75.250",
                        "netmask" : 0,
                        "objectCreateType" : null,
                        "userOperationType" : null
                      } ],
                  "autoPortAllocation" : { "auto" : true,
                      "createdBy" : "super",
                      "createdTime" : 1416206309000,
                      "description" : null,
                      "id" : 592752,
                      "modifiedBy" : "super",
                      "modifiedTime" : 1416206309000,
                      "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
                      "name" : "napt44-SS1-p1",
                      "objectCreateType" : null,
                      "randomAllocation" : true,
                      "userOperationType" : null
                    },
                  "configEditStatus" : null,
                  "createdBy" : "super",
                  "createdTime" : 1416206309000,
                  "description" : null,
                  "id" : 592753,
                  "locked" : false,
                  "lockedAt" : null,
                  "lockedBy" : null,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416206309000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
                  "name" : "napt44-SS1-p1",
                  "objectCreateType" : "OBJECTBUILDER",
                  "roundRobin" : true,
                  "userOperationType" : null
                },
              "syslog" : false,
              "translationType" : "NAPT_44",
              "userOperationType" : null
            }
          ],
        "objectCreateType" : "TEMPLATE",
        "ruleSets" : null,
        "sdgName" : null,
        "serviceSets" : null,
        "userOperationType" : null
      } ],
  "description" : "TEST_TEMPLATE DESC",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : { "APPLICATIONS" : [ "junos-ip" ],
      "APPLICATION_SETS" : [ "junos-algs-outbound" ],
      "CGNAT_POOLS" : [ "napt44-SS1-p1" ],
      "CGNAT_RULES" : [ "napt44-SS1-r1" ]
    },
  "serviceSets" : [ { "insideServiceInterface" : "sp-1/0/0.0",
        "name" : "SerS",
        "natRuleSets" : [ "RuleSet" ],
        "natRules" : [ "napt44-SS1-r1" ],
        "objectCreateType" : "TEMPLATE",
        "outsideServiceInterface" : "sp-1/1/0.100",
        "replicateServices" : { "name" : "RepService",
            "nat" : false,
            "statefulFirewall" : false
          },
        "sysLogName" : ""
      } ],
  "status" : "UNPUBLISHED",
  "syslogs" : [ { "facilityOverride" : "AUTHORIZATION",
        "ipAddress" : "Syslog",
        "logPrefix" : "1",
        "name" : "Syslog",
        "objectCreateType" : "TEMPLATE",
        "port" : "1",
        "sessionLogsClose" : false,
        "sessionLogsOpen" : false,
        "syslogClassType" : [ "SESSION_LOGS" ],
        "syslogServiceType" : "ALERT"
      } ],
  "uiPermissionMap" : { "APPLICATIONS" : "EDITABLE",
      "APPLICATION_SETS" : "EDITABLE",
      "CGNAT_POOLS" : "EDITABLE",
      "CGNAT_RULES" : "EDITABLE",
      "CGNAT_RULE_SETS" : "EDITABLE",
      "SERVICE_SETS" : "DEVICE_SPECIFIC",
      "SYSLOGS" : "EDITABLE"
    }
}

Import CGNAT Templates

This request is used to import a CGNAT service template.

URI

/api/sgd/configmanager/servicetemplate/
prepareservicestructurefromhost?osVersion=14.1

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromhost
?osVersion=14.1
+json;version=1;charset=UTF-8

Consumes

None

Produces

Imports a CGNAT service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "serviceTemplateInput" : { "deviceId" : "131093",
      "instanceName" : "NAPT44-SS1",
      "serviceType" : "CGNAT"
    } }

Modify CGNAT Templates

This request is used to modify a CGNAT service template.

URI

/api/sgd/configmanager/servicetemplate/
modifycgnatservicetemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.modifycgnatservicetemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Modifies a CGNAT service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "applicationSets" : [ { "applications" : [ "junos-ftp",
            "junos-tftp",
            "junos-rpc-portmap-tcp",
            "junos-rpc-portmap-udp",
            "junos-snmp-get",
            "junos-snmp-get-next",
            "junos-snmp-response",
            "junos-snmp-trap",
            "junos-rexec",
            "junos-rlogin",
            "junos-rsh",
            "junos-rtsp",
            "junos-citrix-winframe",
            "junos-citrix-winframe-udp",
            "junos-sqlnet",
            "junos-h323",
            "junos-iiop-java",
            "junos-iiop-orbix",
            "junos-realaudio",
            "junos-traceroute",
            "junos-rpc-services-udp",
            "junos-rpc-services-tcp",
            "junos-icmp-all",
            "junos-netshow",
            "junos-netbios-name-udp",
            "junos-netbios-datagram",
            "junos-dce-rpc-portmap",
            "junos-dcerpc-msexchange-directory-rfr",
            "junos-dcerpc-msexchange-information-store",
            "junos-dcerpc-msexchange-directory-nsp",
            "junos-sip"
          ],
        "createdBy" : null,
        "createdTime" : 1416196136000,
        "defaultApplicationSet" : true,
        "description" : null,
        "id" : 589980,
        "modifiedBy" : null,
        "modifiedTime" : 1416196136000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationSetEntity:589980",
        "name" : "junos-algs-outbound",
        "objectCreateType" : "TEMPLATE",
        "userOperationType" : null
      } ],
  "applications" : [ { "applicationProtocol" : "IP",
        "createdBy" : null,
        "createdTime" : 1416196136000,
        "defaultApplication" : true,
        "description" : null,
        "destinationPort" : null,
        "icmpType" : null,
        "id" : 589850,
        "inactivityTimeout" : null,
        "modifiedBy" : null,
        "modifiedTime" : 1416196136000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.ApplicationEntity:589850",
        "name" : "junos-ip",
        "objectCreateType" : "TEMPLATE",
        "protocol" : null,
        "sourcePort" : null,
        "userOperationType" : null
      } ],
  "cgnatPools" : [ { "address" : [ { "addressType" : "RANGE",
              "configEditStatus" : null,
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "groups" : null,
              "hiIp" : "192.168.75.250",
              "id" : 592756,
              "ipAddress" : null,
              "ipFamily" : "IPv4",
              "locked" : false,
              "lockedAt" : null,
              "lockedBy" : null,
              "lowIp" : "192.168.75.0",
              "members" : null,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
              "name" : "192.168.75.0-192.168.75.250",
              "netmask" : 0,
              "objectCreateType" : null,
              "userOperationType" : null
            } ],
        "autoPortAllocation" : { "auto" : true,
            "createdBy" : "super",
            "createdTime" : 1416206309000,
            "description" : null,
            "id" : 592752,
            "modifiedBy" : "super",
            "modifiedTime" : 1416206309000,
            "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
            "name" : "napt44-SS1-p1",
            "objectCreateType" : null,
            "randomAllocation" : true,
            "userOperationType" : null
          },
        "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206309000,
        "description" : null,
        "id" : 592753,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "modifiedBy" : "super",
        "modifiedTime" : 1416206309000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
        "name" : "napt44-SS1-p1",
        "objectCreateType" : "TEMPLATE",
        "roundRobin" : true,
        "userOperationType" : null
      } ],
  "cgnatRuleSets" : [ { "cgnatRules" : [ "napt44-SS1-r1" ],
        "name" : "RuleSet",
        "objectCreateType" : "TEMPLATE"
      } ],
  "cgnatRules" : [ { "configEditStatus" : null,
        "createdBy" : "super",
        "createdTime" : 1416206309000,
        "description" : null,
        "hostName" : null,
        "hostNames" : null,
        "id" : 592778,
        "idString" : null,
        "locked" : false,
        "lockedAt" : null,
        "lockedBy" : null,
        "matchDirection" : "INPUT",
        "modifiedBy" : "super",
        "modifiedTime" : 1416206309000,
        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATRuleEntity:592778",
        "name" : "napt44-SS1-r1",
        "natTerms" : [ { "addressPooling" : "PAIRED",
              "applicationSets" : [ "APP_ABC",
                  "APP_SET_ABC"
                ],
              "applications" : [ "test12" ],
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "destPortEndVal" : null,
              "destPortStartVal" : null,
              "destinationAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592780,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592780",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "destinationPool" : null,
              "hostName" : null,
              "id" : 592779,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEntity:592779",
              "name" : "t1",
              "objectCreateType" : null,
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "GROUP",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592784,
                    "ipAddress" : null,
                    "ipFamily" : null,
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : [ "10.1.1.1/32",
                        "10.1.1.11/32",
                        "10.1.1.12/32"
                      ],
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592784",
                    "name" : "add_abc_group1",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "sourcePool" : { "address" : [ { "addressType" : "RANGE",
                        "configEditStatus" : null,
                        "createdBy" : "super",
                        "createdTime" : 1416206309000,
                        "description" : null,
                        "groups" : null,
                        "hiIp" : "192.168.75.250",
                        "id" : 592756,
                        "ipAddress" : null,
                        "ipFamily" : "IPv4",
                        "locked" : false,
                        "lockedAt" : null,
                        "lockedBy" : null,
                        "lowIp" : "192.168.75.0",
                        "members" : null,
                        "modifiedBy" : "super",
                        "modifiedTime" : 1416206309000,
                        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
                        "name" : "192.168.75.0-192.168.75.250",
                        "netmask" : 0,
                        "objectCreateType" : null,
                        "userOperationType" : null
                      } ],
                  "autoPortAllocation" : { "auto" : true,
                      "createdBy" : "super",
                      "createdTime" : 1416206309000,
                      "description" : null,
                      "id" : 592752,
                      "modifiedBy" : "super",
                      "modifiedTime" : 1416206309000,
                      "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
                      "name" : "napt44-SS1-p1",
                      "objectCreateType" : null,
                      "randomAllocation" : true,
                      "userOperationType" : null
                    },
                  "configEditStatus" : null,
                  "createdBy" : "super",
                  "createdTime" : 1416206309000,
                  "description" : null,
                  "id" : 592753,
                  "locked" : false,
                  "lockedAt" : null,
                  "lockedBy" : null,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416206309000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
                  "name" : "napt44-SS1-p1",
                  "objectCreateType" : "OBJECTBUILDER",
                  "roundRobin" : true,
                  "userOperationType" : null
                },
              "syslog" : false,
              "translationType" : "NAPT_44",
              "userOperationType" : null
            },
            { "addressPooling" : "PAIRED",
              "applicationSets" : [  ],
              "applications" : [  ],
              "createdBy" : "super",
              "createdTime" : 1416206309000,
              "description" : null,
              "destPortEndVal" : null,
              "destPortStartVal" : null,
              "destinationAddresses" : null,
              "destinationPool" : null,
              "hostName" : null,
              "id" : 592788,
              "modifiedBy" : "super",
              "modifiedTime" : 1416206309000,
              "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEntity:592788",
              "name" : "t2",
              "objectCreateType" : null,
              "ruleId" : null,
              "sourceAddresses" : [ { "addressType" : "HOST",
                    "configEditStatus" : null,
                    "createdBy" : "super",
                    "createdTime" : 1416206309000,
                    "description" : null,
                    "groups" : null,
                    "hiIp" : null,
                    "id" : 592789,
                    "ipAddress" : "any-unicast",
                    "ipFamily" : "IPv4",
                    "locked" : false,
                    "lockedAt" : null,
                    "lockedBy" : null,
                    "lowIp" : null,
                    "members" : null,
                    "modifiedBy" : "super",
                    "modifiedTime" : 1416206309000,
                    "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592789",
                    "name" : "any-unicast",
                    "netmask" : 0,
                    "objectCreateType" : null,
                    "userOperationType" : null
                  } ],
              "sourcePool" : { "address" : [ { "addressType" : "RANGE",
                        "configEditStatus" : null,
                        "createdBy" : "super",
                        "createdTime" : 1416206309000,
                        "description" : null,
                        "groups" : null,
                        "hiIp" : "192.168.75.250",
                        "id" : 592756,
                        "ipAddress" : null,
                        "ipFamily" : "IPv4",
                        "locked" : false,
                        "lockedAt" : null,
                        "lockedBy" : null,
                        "lowIp" : "192.168.75.0",
                        "members" : null,
                        "modifiedBy" : "super",
                        "modifiedTime" : 1416206309000,
                        "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:592756",
                        "name" : "192.168.75.0-192.168.75.250",
                        "netmask" : 0,
                        "objectCreateType" : null,
                        "userOperationType" : null
                      } ],
                  "autoPortAllocation" : { "auto" : true,
                      "createdBy" : "super",
                      "createdTime" : 1416206309000,
                      "description" : null,
                      "id" : 592752,
                      "modifiedBy" : "super",
                      "modifiedTime" : 1416206309000,
                      "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATAutoPortAllocEntity:592752",
                      "name" : "napt44-SS1-p1",
                      "objectCreateType" : null,
                      "randomAllocation" : true,
                      "userOperationType" : null
                    },
                  "configEditStatus" : null,
                  "createdBy" : "super",
                  "createdTime" : 1416206309000,
                  "description" : null,
                  "id" : 592753,
                  "locked" : false,
                  "lockedAt" : null,
                  "lockedBy" : null,
                  "modifiedBy" : "super",
                  "modifiedTime" : 1416206309000,
                  "moid" : "net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATPoolEntity:592753",
                  "name" : "napt44-SS1-p1",
                  "objectCreateType" : "OBJECTBUILDER",
                  "roundRobin" : true,
                  "userOperationType" : null
                },
              "syslog" : false,
              "translationType" : "NAPT_44",
              "userOperationType" : null
            }
          ],
        "objectCreateType" : "TEMPLATE",
        "ruleSets" : null,
        "sdgName" : null,
        "serviceSets" : null,
        "userOperationType" : null
      } ],
  "description" : "TEST_TEMPLATE DESC",
  "name" : "TEST_TEMPLATE",
  "objectBuilderImportComponentListMap" : { "APPLICATIONS" : [ "junos-ip" ],
      "APPLICATION_SETS" : [ "junos-algs-outbound" ],
      "CGNAT_POOLS" : [ "napt44-SS1-p1" ],
      "CGNAT_RULES" : [ "napt44-SS1-r1" ]
    },
  "serviceSets" : [ { "insideServiceInterface" : "sp-1/0/0.0",
        "name" : "SerS",
        "natRuleSets" : [ "RuleSet" ],
        "natRules" : [ "napt44-SS1-r1" ],
        "objectCreateType" : "TEMPLATE",
        "outsideServiceInterface" : "sp-1/1/0.100",
        "replicateServices" : { "name" : "RepService",
            "nat" : false,
            "statefulFirewall" : false
          },
        "sysLogName" : ""
      } ],
  "status" : "UNPUBLISHED",
  "syslogs" : [ { "facilityOverride" : "AUTHORIZATION",
        "ipAddress" : "Syslog",
        "logPrefix" : "1",
        "name" : "Syslog",
        "objectCreateType" : "TEMPLATE",
        "port" : "1",
        "sessionLogsClose" : false,
        "sessionLogsOpen" : false,
        "syslogClassType" : [ "SESSION_LOGS" ],
        "syslogServiceType" : "ALERT"
      } ],
  "uiPermissionMap" : { "APPLICATIONS" : "EDITABLE",
      "APPLICATION_SETS" : "EDITABLE",
      "CGNAT_POOLS" : "EDITABLE",
      "CGNAT_RULES" : "EDITABLE",
      "CGNAT_RULE_SETS" : "EDITABLE",
      "SERVICE_SETS" : "DEVICE_SPECIFIC",
      "SYSLOGS" : "EDITABLE"
    }
}

Delete CGNAT Templates

This request is used to delete a CGNAT service template.

URI

/api/sgd/configmanager/servicetemplate/
deleteservicetemplatebynames/CGNAT

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.deleteservicetemplatebynames.CGNAT
+json;version=1;charset=UTF-8

Consumes

None

Produces

Deletes a CGNAT service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{"teampleteNames":["Test_Template"]}

Get All CGNAT Templates By Type

This request is used to retrieve all the configured CGNAT service templates by their types.

URI

/api/sgd/configmanager/servicetemplate/
getallservicetemplatesbytype/CGNAT

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallservicetemplatesbytype.CGNAT
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured CGNAT templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the CGNAT service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.CGNATTemplateEntity:593405",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T12:11:18+05:30",
          "description" : "TEST_TEMPLATE DESC",
          "id" : 593405,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T12:11:18+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "UNPUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 1
    } }

Get CGNAT Template Details

This request is used to prepare a CGNAT service structure from a template.

URI

/api/sgd/configmanager/servicetemplate/
/prepareservicestructurefromtemplate/
TEST_TEMPLATE/CGNAT

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromtemplate.
TEST_TEMPLATE.CGNAT
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects a CGNAT template details

Response Status Code

Message

Description

200 OK

Successful collection of the CGNAT service template details

Output

Sample JSON Output

{
    "response":{
        "id":593405,
        
"MOID":"net.juniper.jmp.sgd.configmanager.template.jpa.CGNATTemplateEntit
y:593405",
        "createdBy":"super",
        "modifiedBy":"super",
        "createdTime":"2014-11-17T12:11:18+05:30",
        "modifiedTime":"2014-11-17T12:11:18+05:30",
        "to":{
            "configViewComponentsTOs":[
                {
                    "configViewComponentList":{
                        "name":"junos-ip",
                        "configKnob":"applications",
                        "truncatedName":"junos-ip",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/applications.png",
                        "paretPanel":"applications",
                        
"configData":"{\"id\":593438,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"junos-
ip\",\"description\":null,\"objectCreateType\":null,\"protocol\":null,\"a
pplicationProtocol\":\"IP\",\"sourcePort\":null,\"destinationPort\":null,
\"inactivityTimeout\":null,\"icmpType\":null,\"defaultApplication\":true,
\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.Applicatio
nEntity:593438\"}",
                        "description":""
                    },
                    "name":"Application",
                    "type":"APPLICATIONS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Applications"
                },
                {
                    "configViewComponentList":{
                        "name":"junos-algs-outbound",
                        "configKnob":"application-sets",
                        "truncatedName":"junos-al..",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/app_rule_set.png",
                        "paretPanel":"application-sets",
                        
"configData":"{\"id\":593406,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"junos-algs-
outbound\",\"description\":null,\"objectCreateType\":null,\"applications\
":[\"junos-ftp\",\"junos-tftp\",\"junos-rpc-portmap-tcp\",\"junos-rpc-
portmap-udp\",\"junos-snmp-get\",\"junos-snmp-get-next\",\"junos-snmp-
response\",\"junos-snmp-trap\",\"junos-rexec\",\"junos-rlogin\",\"junos-
rsh\",\"junos-rtsp\",\"junos-citrix-winframe\",\"junos-citrix-winframe-
udp\",\"junos-sqlnet\",\"junos-h323\",\"junos-iiop-java\",\"junos-iiop-
orbix\",\"junos-realaudio\",\"junos-traceroute\",\"junos-rpc-services-
udp\",\"junos-rpc-services-tcp\",\"junos-icmp-all\",\"junos-
netshow\",\"junos-netbios-name-udp\",\"junos-netbios-datagram\",\"junos-
dce-rpc-portmap\",\"junos-dcerpc-msexchange-directory-rfr\",\"junos-
dcerpc-msexchange-information-store\",\"junos-dcerpc-msexchange-
directory-nsp\",\"junos-
sip\"],\"defaultApplicationSet\":true,\"moid\":\"net.juniper.jmp.sgd.conf
igmanager.config.jpa.common.ApplicationSetEntity:593406\"}",
                        "description":""
                    },
                    "name":"Application Sets",
                    "type":"APPLICATION_SETS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Group of Applications to 
form application-set"
                },
                {
                    "configViewComponentList":{
                        "name":"Syslog",
                        "configKnob":"syslogs",
                        "truncatedName":"Syslog",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/sys_log.png",
                        "paretPanel":"syslogs",
                        
"configData":"{\"id\":593459,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":null,\"modifiedTime\":null,\"userOperationType\":nul
l,\"name\":\"Syslog\",\"description\":null,\"objectCreateType\":null,\"ip
Address\":\"Syslog\",\"facilityOverride\":\"AUTHORIZATION\",\"logPrefix\"
:\"1\",\"syslogServiceType\":\"ALERT\",\"syslogClassType\":[\"SESSION_LOG
S\"],\"sessionLogsOpen\":false,\"sessionLogsClose\":false,\"port\":1,\"mo
id\":\"net.juniper.jmp.sgd.configmanager.config.jpa.serviceset.SyslogEnti
ty:593459\"}",
                        "description":""
                    },
                    "name":"Syslogs",
                    "type":"SYSLOGS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Syslog Properties"
                },
                {
                    "configViewComponentList":{
                        "name":"napt44-SS1-p1",
                        "configKnob":"nat-pools",
                        "truncatedName":"napt44-S..",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/nat_pool_new.png",
                        "paretPanel":"nat-pools",
                        
"configData":"{\"id\":593442,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":
null,\"lockedBy\":null,\"lockedAt\":null,\"address\":[{\"id\":593445,\"cr
eatedBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":141620647800
0,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":\"19
2.168.75.0-
192.168.75.250\",\"description\":null,\"objectCreateType\":null,\"configE
ditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"addressType\":\"RA
NGE\",\"hiIp\":\"192.168.75.250\",\"lowIp\":\"192.168.75.0\",\"ipAddress\
":null,\"ipFamily\":\"IPv4\",\"members\":null,\"groups\":null,\"netmask\"
:0,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.j
pa.common.AddressEntity:593445\"}],\"autoPortAllocation\":{\"id\":593441,
\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162064
78000,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":
\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"auto\":true,\"rando
mAllocation\":true,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jp
a.cgnat.CGNATAutoPortAllocEntity:593441\"},\"roundRobin\":true,\"locked\"
:false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNA
TPoolEntity:593442\"}",
                        "description":""
                    },
                    "name":"NAT Pools",
                    "type":"CGNAT_POOLS",
                    "permissionType":"EDITABLE",
                    "description":"Configure Address Pool Properties"
                },
                {
                    "configViewComponentList":{
                        "name":"napt44-SS1-r1",
                        "configKnob":"nat-rules",
                        "truncatedName":"napt44-S..",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/nat_rule.png",
                        "paretPanel":"nat-rules",
                        
"configData":"{\"id\":593440,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"napt44-SS1-
r1\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":
null,\"lockedBy\":null,\"lockedAt\":null,\"matchDirection\":\"INPUT\",\"n
atTerms\":[{\"id\":593446,\"createdBy\":\"super\",\"modifiedBy\":\"super\
",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userOper
ationType\":null,\"name\":\"t1\",\"description\":null,\"objectCreateType\
":null,\"hostName\":null,\"ruleId\":null,\"applicationSets\":[\"APP_ABC\
",\"APP_SET_ABC\"],\"applications\":[\"test12\"],\"destinationAddresses\
":[{\"id\":593447,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"crea
tedTime\":1416206478000,\"modifiedTime\":1416206478000,\"userOperationTyp
e\":null,\"name\":\"add_abc_group1\",\"description\":null,\"objectCreate
Type\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null
,\"addressType\":\"GROUP\",\"hiIp\":null,\"lowIp\":null,\"ipAddress\":nul
l,\"ipFamily\":null,\"members\":[\"10.1.1.1\/32\",\"10.1.1.11\/32\",\"10.1.1
.12\/32\"],\"groups\":null,\"netmask\":0,\"locked\":false,\"moid\":\"net.
juniper.jmp.sgd.configmanager.config.jpa.common.AddressEntity:593447\"}],
\"sourceAddresses\":[{\"id\":593451,\"createdBy\":\"super\",\"modifiedBy\
":\"super\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,
\"userOperationType\":null,\"name\":\"add_abc_group1\",\"description\":n
ull,\"objectCreateType\":null,\"configEditStatus\":null,\"lockedBy\":null
,\"lockedAt\":null,\"addressType\":\"GROUP\",\"hiIp\":null,\"lowIp\":null
,\"ipAddress\":null,\"ipFamily\":null,\"members\":[\"10.1.1.1\/32\",\"10.1.
1.11\/32\",\"10.1.1.12\/32\"],\"groups\":null,\"netmask\":0,\"locked\":fal
se,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.common.Address
Entity:593451\"}],\"addressPooling\":\"PAIRED\",\"sourcePool\":{\"id\":59
3442,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":141
6206478000,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"na
me\":\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":
null,\"lockedBy\":null,\"lockedAt\":null,\"address\":[{\"id\":593445,\"cr
eatedBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":141620647800
0,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":\"19
2.168.75.0-
192.168.75.250\",\"description\":null,\"objectCreateType\":null,\"configE
ditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"addressType\":\"RA
NGE\",\"hiIp\":\"192.168.75.250\",\"lowIp\":\"192.168.75.0\",\"ipAddress\
":null,\"ipFamily\":\"IPv4\",\"members\":null,\"groups\":null,\"netmask\"
:0,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.j
pa.common.AddressEntity:593445\"}],\"autoPortAllocation\":{\"id\":593441,
\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162064
78000,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":
\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"auto\":true,\"rando
mAllocation\":true,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jp
a.cgnat.CGNATAutoPortAllocEntity:593441\"},\"roundRobin\":true,\"locked\"
:false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNA
TPoolEntity:593442\"},\"destinationPool\":null,\"translationType\":\"NAPT
_44\",\"syslog\":false,\"destPortStartVal\":null,\"destPortEndVal\":null,
\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEn
tity:593446\"},{\"id\":593455,\"createdBy\":\"super\",\"modifiedBy\":\"su
per\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"user
OperationType\":null,\"name\":\"t2\",\"description\":null,\"objectCreateT
ype\":null,\"hostName\":null,\"ruleId\":null,\"applicationSets\":[],\"app
lications\":[],\"destinationAddresses\":null,\"sourceAddresses\":[{\"id\"
:593456,\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":
1416206478000,\"modifiedTime\":1416206478000,\"userOperationType\":null,\
"name\":\"any-
unicast\",\"description\":null,\"objectCreateType\":null,\"configEditStat
us\":null,\"lockedBy\":null,\"lockedAt\":null,\"addressType\":\"HOST\",\"
hiIp\":null,\"lowIp\":null,\"ipAddress\":\"any-
unicast\",\"ipFamily\":\"IPv4\",\"members\":null,\"groups\":null,\"netmas
k\":0,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.confi
g.jpa.common.AddressEntity:593456\"}],\"addressPooling\":\"PAIRED\",\"sou
rcePool\":{\"id\":593442,\"createdBy\":\"super\",\"modifiedBy\":\"super\"
,\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userOpera
tionType\":null,\"name\":\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"configEditStatus\":
null,\"lockedBy\":null,\"lockedAt\":null,\"address\":[{\"id\":593445,\"cr
eatedBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":141620647800
0,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":\"19
2.168.75.0-
192.168.75.250\",\"description\":null,\"objectCreateType\":null,\"configE
ditStatus\":null,\"lockedBy\":null,\"lockedAt\":null,\"addressType\":\"RA
NGE\",\"hiIp\":\"192.168.75.250\",\"lowIp\":\"192.168.75.0\",\"ipAddress\
":null,\"ipFamily\":\"IPv4\",\"members\":null,\"groups\":null,\"netmask\"
:0,\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.j
pa.common.AddressEntity:593445\"}],\"autoPortAllocation\":{\"id\":593441,
\"createdBy\":\"super\",\"modifiedBy\":\"super\",\"createdTime\":14162064
78000,\"modifiedTime\":1416206478000,\"userOperationType\":null,\"name\":
\"napt44-SS1-
p1\",\"description\":null,\"objectCreateType\":null,\"auto\":true,\"rando
mAllocation\":true,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jp
a.cgnat.CGNATAutoPortAllocEntity:593441\"},\"roundRobin\":true,\"locked\"
:false,\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNA
TPoolEntity:593442\"},\"destinationPool\":null,\"translationType\":\"NAPT
_44\",\"syslog\":false,\"destPortStartVal\":null,\"destPortEndVal\":null,
\"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATTermEn
tity:593455\"}],\"sdgName\":null,\"hostNames\":null,\"hostName\":null,\"s
erviceSets\":null,\"ruleSets\":null,\"idString\":null,\"locked\":false,\"
moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.cgnat.CGNATRuleEnti
ty:593440\"}",
                        "description":""
                    },
                    "name":"NAT Rule",
                    "type":"CGNAT_RULES",
                    "permissionType":"EDITABLE",
                    "description":"Configure NAT Rule for address 
translation"
                },
                {
                    "configViewComponentList":{
                        "name":"RuleSet",
                        "configKnob":"nat-rule-sets",
                        "truncatedName":"RuleSet",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/nat_rule_set.png",
                        "paretPanel":"nat-rule-sets",
                        
"configData":"{\"id\":593439,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"RuleSet\",\"description\":null,\"objectCre
ateType\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":n
ull,\"cgnatRules\":[\"napt44-SS1-
r1\"],\"locked\":false,\"moid\":\"net.juniper.jmp.sgd.configmanager.confi
g.jpa.cgnat.CGNATRuleSetEntity:593439\"}",
                        "description":""
                    },
                    "name":"NAT Rule Sets",
                    "type":"CGNAT_RULE_SETS",
                    "permissionType":"EDITABLE",
                    "description":"Configure group of Rules to form Rule-
set"
                },
                {
                    "configViewComponentList":{
                        "name":"SerS",
                        "configKnob":"service-sets",
                        "truncatedName":"SerS",
                        "labelAlign":"right",
                        
"image":"\/sgdui\/web\/images\/viewconfig\/service_set.png",
                        "paretPanel":"service-sets",
                        
"configData":"{\"id\":593458,\"createdBy\":\"super\",\"modifiedBy\":\"sup
er\",\"createdTime\":1416206478000,\"modifiedTime\":1416206478000,\"userO
perationType\":null,\"name\":\"SerS\",\"description\":null,\"objectCreate
Type\":null,\"configEditStatus\":null,\"lockedBy\":null,\"lockedAt\":null
,\"natRules\":[\"napt44-SS1-
r1\"],\"sfwRules\":null,\"natRuleSets\":[\"RuleSet\"],\"sfwRuleSets\":nul
l,\"insideServiceInterface\":\"sp-
1\/0\/0.0\",\"outsideServiceInterface\":\"sp-
1\/1\/0.100\",\"sysLogName\":null,\"syslogConfig\":null,\"replicateServic
es\":{\"id\":null,\"createdBy\":null,\"modifiedBy\":null,\"createdTime\":
null,\"modifiedTime\":null,\"userOperationType\":null,\"name\":null,\"des
cription\":null,\"objectCreateType\":null,\"replicationThreshold\":null,\
"nat\":false,\"statefulFirewall\":false,\"moid\":null},\"locked\":false,\
"moid\":\"net.juniper.jmp.sgd.configmanager.config.jpa.serviceset.Service
SetEntity:593458\"}",
                        "description":""
                    },
                    "name":"Service Sets",
                    "type":"SERVICE_SETS",
                    "permissionType":"DEVICE_SPECIFIC",
                    "description":"Configure Service-set to apply 
Service"
                }
            ],
            "noOfPanels":7
        },
        "serviceType":"CGNAT",
        "name":"TEST_TEMPLATE",
        "description":"TEST_TEMPLATE DESC",
        "status":"UNPUBLISHED",
        "uiPermissionMap":{
            "entry":[
                {
                    "key":"CGNAT_RULES",
                    "value":"EDITABLE"
                },
                {
                    "key":"APPLICATIONS",
                    "value":"EDITABLE"
                },
                {
                    "key":"SERVICE_SETS",
                    "value":"DEVICE_SPECIFIC"
                },
                {
                    "key":"APPLICATION_SETS",
                    "value":"EDITABLE"
                },
                {
                    "key":"CGNAT_POOLS",
                    "value":"EDITABLE"
                },
                {
                    "key":"CGNAT_RULE_SETS",
                    "value":"EDITABLE"
                },
                {
                    "key":"SYSLOGS",
                    "value":"EDITABLE"
                }
            ]
        }
    }
}

Get All Published CGNAT Templates

This request is used to retrieve all the published CGNAT service templates.

URI

/api/sgd/configmanager/servicetemplate/
getallpublishedservicetemplatesbytype/CGNAT

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getallpublishedservicetemplatesbytype.CGNAT
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the published CGNAT templates by type

Response Status Code

Message

Description

200 OK

Successful collection of the published CGNAT service templates by types

Output

Sample JSON Output

{ "response" : { "data" : { "MOID" : "net.juniper.jmp.sgd.configmanager.template.jpa.CGNATTemplateEntity:593405",
          "createdBy" : "super",
          "createdTime" : "2014-11-17T12:11:18+05:30",
          "description" : "TEST_TEMPLATE DESC NEW",
          "id" : 593405,
          "modifiedBy" : "super",
          "modifiedTime" : "2014-11-17T12:13:28+05:30",
          "name" : "TEST_TEMPLATE",
          "status" : "PUBLISHED"
        },
      "schemaName" : "SGDServiceTemplateTO",
      "success" : true,
      "totalRows" : 0
    } }

Get All CGNAT Template Structures By Type

This request is used to retrieve all the configured CGNAT service template structures by their types. The configuration details are displayed in property view and configuration view. The property view is useful if you want a GUI, tree-based structure of display. In this view, you can drill-down the tree and view data about each of the service attributes. Property view is simple view of configuration as key value pair. The dynamic fields in form view are defined using parameters. The configuration view is beneficial if you are familiar with the CLI interface structure and want to view service attributes in the form of configuration stanzas and hierarchy levels.

URI

/api/sgd/configmanager/servicetemplate/
getservicetemplatestruturebytype/CGNAT
?osVersion={osVersion(12.1/14.1)}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.getservicetemplatestruturebytype.CGNAT
?osVersion={osVersion(12.1/14.1)}
+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all the configured CGNAT template structures by type

Response Status Code

Message

Description

200 OK

Successful collection of the CGNAT service template structures by types

Output

Sample JSON Output

{ "response" : { "serviceInstanceName" : "",
      "serviceType" : "CGNAT",
      "to" : { "configViewComponentsTOs" : [ { "description" : "Configure Applications",
                "name" : "Application",
                "permissionType" : "EDITABLE",
                "type" : "APPLICATIONS"
              },
              { "description" : "Configure Group of Applications to form application-set",
                "name" : "Application Sets",
                "permissionType" : "EDITABLE",
                "type" : "APPLICATION_SETS"
              },
              { "description" : "Configure Syslog Properties",
                "name" : "Syslogs",
                "permissionType" : "EDITABLE",
                "type" : "SYSLOGS"
              },
              { "description" : "Configure Address Pool Properties",
                "name" : "NAT Pools",
                "permissionType" : "EDITABLE",
                "type" : "CGNAT_POOLS"
              },
              { "description" : "Configure NAT Rule for address translation",
                "name" : "NAT Rule",
                "permissionType" : "EDITABLE",
                "type" : "CGNAT_RULES"
              },
              { "description" : "Configure group of Rules to form Rule-set",
                "name" : "NAT Rule Sets",
                "permissionType" : "EDITABLE",
                "type" : "CGNAT_RULE_SETS"
              },
              { "description" : "Configure Service-set to apply Service",
                "name" : "Service Sets",
                "permissionType" : "DEVICE_SPECIFIC",
                "type" : "SERVICE_SETS"
              }
            ],
          "noOfPanels" : 7
        }
    } }

Prepare Service Template Structures From an SDG Host

This request is used to construct the service template structure from the SDG host on which it is defined. The structure or format of a template provides the attributes and settings that are configured for a service on an SDG device.

URI

/api/sgd/configmanager/servicetemplate/
prepareservicestructurefromhost
?osVersion=14.1

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.prepareservicestructurefromhost
?osVersion=14.1
+json;version=1;charset=UTF-8

Consumes

None

Produces

Generates a service template structure for an SDG device

Response Status Code

Message

Description

200 OK

Successful generation of a service template structure

Input

Sample JSON Input

{ "serviceTemplateInput" : { "deviceId" : "425995",
      "instanceName" : "lb1",
      "serviceType" : "ADC"
    } }

Publish Service Templates

This request is used to publish service templates. The designer must publish the service templates to the operator to use in the creation of deployment plans. Published templates are approved and commissioned to the devices.

URI

/api/sgd/configmanager/servicetemplate/
gridContextAction

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.gridContextAction
+json;version=1;charset=UTF-8

Consumes

None

Produces

Publishes a service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "templateGridContextAction" : { "contextAction" : "PUBLISH",
      "serviceType" : "ADC",
      "templateNames" : [ "dsds" ]
    } }

Unpublish Service Templates

This request is used to unpublish service templates. To make a template definition unavailable to operators, you must unpublish it. You must also unpublish a definition before you can modify or delete it. If you unpublish a definition that is already being used as the basis for templates, all templates based on that definition are disabled.

URI

/api/sgd/configmanager/servicetemplate/
gridContextAction

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.gridContextAction
+json;version=1;charset=UTF-8

Consumes

None

Produces

Unpublishes a service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "templateGridContextAction" : { "contextAction" : "UNPUBLISH",
      "serviceType" : "ADC",
      "templateNames" : [ "dsds" ]
    } }

Clone Service Templates

This request is used to clone service templates. Instead of creating a new template entirely, you can import the parameters defined for a previous service instance and customize only the settings that are necessary. Imported templates are created without any device assigned to them. To use these templates, you must associate a device with the policy. Also, you can either import all of the components of a service or specific components.

URI

/api/sgd/configmanager/servicetemplate/
cloneTemplate

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.cloneTemplate
+json;version=1;charset=UTF-8

Consumes

None

Produces

Clones a service template

Response Status Code

Message

Description

204 No Content

The server fulfilled the request, but does not need to return a response message body

Input

Sample JSON Input

{ "cloneTemplateContextAction" : { "existingTemplateName" : "dsds",
      "newTemplateDesc" : "ddsdsdsd",
      "newTemplateName" : "dsdsdsdsd",
      "serviceType" : "ADC"
    } }

Get Service Template Statistics By Service Type With Publish Status

This request is used to obtain service template statistics based on service type with publish status.

URI

/api/sgd/configmanager/servicetemplate/
servicetemplatestatistics

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.configmanager.
servicetemplate.servicetemplatestatistics
+json;version=1;charset=UTF-8

Consumes

None

Produces

Retrieves the service template statistics based on service type

Response Status Code

Message

Description

200 OK

Successful collection of service template statistics based on the type of service

Output

Sample JSON Output

[ { "ServiceTemplateStatisticTO" : { "name" : "ADC",
        "published" : 1,
        "unpublished" : 2
      } },
  { "ServiceTemplateStatisticTO" : { "name" : "TLB",
        "published" : 1,
        "unpublished" : 0
      } },
  { "ServiceTemplateStatisticTO" : { "name" : "CGNAT",
        "published" : 1,
        "unpublished" : 0
      } },
  { "ServiceTemplateStatisticTO" : { "name" : "SFW",
        "published" : 1,
        "unpublished" : 0
      } }
]

Modified: 2016-08-02