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 Analyzer RESTful Web Services

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

Get All Service Analyzer Instances

This request is used to obtain a list of all the configured service analyzer instances on the devices along with last execution status details.

URI

/api/sgd/monitoring/service-analyzer/
getAllServiceAnalyzerDetails

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getAllServiceAnalyzerDetails
+json;version=1;charset=UTF-8

Parameters

None

Consumes

None

Produces

List of all configured service analyzer instances

Output

Sample JSON Output

{
     "sdgId":33596,
     "sdgName":"mobst480w-mobst480x",
     "cgnatStatus":"PREPARED", 
     "cgnatLastExecutionStatus":"Provisioning Failed",
     "tlbStatus":" PREPARED "
},
{
     "sdgId":33324,
     "sdgName":"mcmx240a-mcmx240c",
     "adcStatus":"PREPARED",
     "adcLastExecutionStatus":"Provisioning Failed",
     "tlbStatus":"PREPARED"
}

Get All SDG Details

This request is used to obtain the list of all the managed SDG devices along with the service names to configure the service analyzer instance details.

URI

/api/sgd/monitoring/service-analyzer/
getAllSDGDetails

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getAllSDGDetails
+json;version=1;charset=UTF-8

Parameters

None

Consumes

None

Produces

List of all managed SDG devices and service names

Output

Sample JSON Output

{
     "sdgId":33324,
     "sdgName":"mcmx240a-mcmx240c",
     "serviceTypes":
     [
          "ADC",
          "TLB",
          "CGNAT"
     ]
},
{
     "sdgId":33596,
     "sdgName":"mobst480w-mobst480x",
     "serviceTypes":
     [
          "ADC",
          "TLB",
          "CGNAT"
     ]
}

Get All Interface Details

This request lists all the interfaces from a specific SDG device for a particular service type.

URI

/api/sgd/monitoring/service-analyzer/
getSDGConfigurationDetails

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getSDGConfigurationDetails
+json;version=1;charset=UTF-8

Parameters

{sdgID} - SDG device ID (eg., 33324)
{serviceType} – Type of the SDG service (eg., CGNAT)

Consumes

None

Produces

List of all interfaces on a specified SDG for a particular service instance.

Output

Sample JSON Output

{
     "interfaceNames":
     [
          "ae100.0", "ae100.10", "ae100.3023",
          "ae100.3025", "ae100.3027", "ae100.3820",
          "ae100.3821", "ae100.3825", "ae100.400",
          "ae100.401", "ae100.402", "ae100.410",
          "ae100.411", "ae100.412", "ae100.800",
          "ae161.0", "ae161.3822", "ae165.0",
          "ae165.3820", "ae165.3821", "ae165.3824",
          "ae165.3825", "ae167.0", "ae167.3827",
          "ae50.0", "ae50.400", "ae50.401",
          "ae50.402" ,"ae50.411" ,"ae52.0",
          "ae52.400", "ae52.401", "ae52.402",
          "ae52.410", "ae52.411", "ae52.412",
          "ae61.0", "ae61.201", "ae61.202",
          "ae62.0", "ae62.3203", "ge-2\/0\/5.0",
          "ge-2\/0\/6.0", "irb.0", "irb.3820",
          "irb.3821", "irb.3822", "irb.3824",
          "irb.3825", "irb.3827", "irb.400",
          "irb.401", "irb.402", "irb.410",
          "irb.411", "irb.412", "irb.800"
     ],
     "serviceInstanceNames":"IPv6-SFW",
     "serviceType":"CGNAT"
}

Update Service Instance Details

This request enables you to create or modify an instance of service analyzer for a particular SDG pair, service type, control forward and control reverse flows, and data forward and data reverse flows.

URI

/api/sgd/monitoring/service-analyzer/
updateServiceInstanceAnalyzerDetails

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
updateServiceInstanceAnalyzerDetails
+json;version=1;charset=UTF-8

Parameters

None

Consumes

None

Produces

Creates or modifies a service analyzer instance

Input

Sample JSON Input

{
     "sdgId":33324,
     "serviceInstanceName":null,
     "serviceType":"TLB",
     "controlForwardFlowEgressInterfaceName":
     [
          "ae161.0", 
          "ae161.3822"
     ],
     "controlForwardFlowIngressInterfaceName":
     [
          "ge-2/0/5.0"
     ],
     "controlReverseFlowEgressInterfaceName":[],
     "controlReverseFlowIngressInterfaceName":[],
     "dataForwardFlowEgressInterfaceName":
     [
          "irb.3820"
     ],
     "dataForwardFlowIngressInterfaceName":
     [
          "irb.400", 
          "irb.401"
     ],
     "dataReverseFlowEgressInterfaceName":[],
     "dataReverseFlowIngressInterfaceName":[]
}

Output

Sample JSON Output

{
     "sdgId":33324,
     "serviceInstanceName":null,
     "serviceType":"TLB",
     "controlForwardFlowEgressInterfaceName":
     [
          "ae161.0", 
          "ae161.3822"
     ],
     "controlForwardFlowIngressInterfaceName":
     [
          "ge-2/0/5.0"
     ],
     "controlReverseFlowEgressInterfaceName":[],
     "controlReverseFlowIngressInterfaceName":[],
     "dataForwardFlowEgressInterfaceName":
     [
          "irb.3820"
     ],
     "dataForwardFlowIngressInterfaceName":
     [
          "irb.400", 
          "irb.401"
     ],
     "dataReverseFlowEgressInterfaceName":[],
     "dataReverseFlowIngressInterfaceName":[]
}

Get a Summary of All Defined Service Analyzer Instance Details

This request provides a synopsis of created service analyzer instance details, running state, collection status, poll count, and an error status.

URI

/api/sgd/monitoring/service-analyzer/
getPreparedServiceInstances

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getPreparedServiceInstances
+json;version=1;charset=UTF-8

Parameters

{sdgId} - SDG device ID (eg., 33324)
{serviceType} – Type of the SDG service (eg., TLB)

Consumes

None

Produces

A summarized view of all configured service analyzer instance details

Output

Sample JSON Output

{
     "id":2752534,      
       "MOID":"net.juniper.jmp.sgd.monitoring.
          service.analyzer.device.service.type.jpa.            
          SDGServiceAnalyzerTLBServiceDetailsEntity:2752534",          
     "createdBy":"super",
     "modifiedBy":"super",
     "createdTime":"2014-11-09T06:15:25Z",
     "modifiedTime":"2014-11-11T23:56:26Z",
     "sdgId":33324,
     "sdgName":"mcmx240a-mcmx240c",
     "serviceType":"TLB",
     "controlForwardFlowEgressInterfaceName":"ae161.0",
     "controlForwardFlowIngressInterfaceName":
     ["ge-2\/0\/5.0","ae52.411","ae61.201"],
     "status":"PREPARED",
     "collectionJobId":0,
     "provisioningJobId":3604512,
     "isCollectionInProgress":false,
     "startTime":1415612738809,
     "pollInterval":60000,
     "runUntilStopped":true,
     "provisioningErrors":[],
     "currentPollCount":0
}

Start a Service Analyzer Instance

This request is used to schedule the date and time at which a service analyzer instance must be run and start a configured service analyzer instance. You can provide the SDG device ID, service type, and scheduler information.

URI

/api/sgd/monitoring/service-analyzer/
startServiceAnalyzerInstance

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
startServiceAnalyzerInstance
+json;version=1;charset=UTF-8

Parameters

None

Consumes

None

Produces

Schedule and start a service analyzer instance

Input

Sample JSON Input

{
     "sdgId":33324,
     "serviceType":"TLB",
      "serviceInstanceName":"",
     "pollInterval":1,
     "startNow":true,
     "startAt":false,
     "startAtDateMilliSeconds":null,
     "runUntilStopped":true,
     "stopAt":false,
     "stopAfter":false,
     "stopAtDateMilliSeconds":null,
     "stopAfterCount":null
}

Output

Sample JSON Output

{
     "sdgId":33324,
     "serviceType":"TLB",
      "serviceInstanceName":"",
     "pollInterval":1,
     "startNow":true,
     "startAt":false,
     "startAtDateMilliSeconds":null,
     "runUntilStopped":true,
     "stopAt":false,
     "stopAfter":false,
     "stopAtDateMilliSeconds":null,
     "stopAfterCount":null
}

Get Service Analyzer Instance Details By Device and Service Type

This request retrieves service analyzer instance details for a particular SDG device and service type.

URI

/api/sgd/monitoring/service-analyzer/
getServiceInstanceAnalyzerDetails

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getServiceInstanceAnalyzerDetails
+json;version=1;charset=UTF-8

Parameters

{sdgId}—SDG device ID (eg., 33324)
{serviceInstanceName}—Service Instance Name
{serviceType}—Type of the SDG service (eg., TLB)

Consumes

None

Produces

List of all configured service analyzer instances for a particular device and service type

Output

Sample JSON Output

{
     "id":2752541,
     "MOID":"net.juniper.jmp.sgd.monitoring.
          service.analyzer.device.service.type.jpa.
          SDGServiceAnalyzerCGNATServiceDetailsEntity:2752541",
     "createdBy":"super",
     "createdTime":"2014-11-08T13:55:16Z",
     "modifiedTime":"2014-11-10T22:55:50Z",
     "sdgId":33161,
     "sdgName":"mobrg480m",
     "serviceType":"CGNAT",
     "dataForwardFlowEgressInterfaceName":"xe-5\/3\/2.20",
     "dataForwardFlowIngressInterfaceName":"ge-5\/2\/9.0",
     "status":"RUNNING",
     "collectionJobId":3605443,
     "provisioningJobId":3604518,
     "isCollectionInProgress":false,
     "startTime":1415613325798,
     "pollInterval":60000,
     "runUntilStopped":true,
     "filterNames":
     [
          "ESD_CGNAT_data_rf_preScv_IPv6",
          "ESD_CGNAT_data_rf_preScv_IPv4",
          "ESD_CGNAT_data_rf_postScv_IPv6",
          "ESD_CGNAT_data_rf_egress_IPv4",
          "ESD_CGNAT_data_ff_postScv_IPv4",
          "ESD_CGNAT_data_ff_postScv_IPv6",
          "ESD_CGNAT_data_rf_ingress_IPv4",
          "ESD_CGNAT_data_rf_egress_IPv6",
          "ESD_CGNAT_data_rf_postScv_IPv4",
          "ESD_CGNAT_data_rf_ingress_IPv6",
          “ESD_CGNAT_data_ff_egress_IPv4",
          "ESD_CGNAT_data_ff_ingress_IPv6",
          "ESD_CGNAT_data_ff_preScv_IPv6",
          "ESD_CGNAT_data_ff_ingress_IPv4",
          "ESD_CGNAT_data_ff_preScv_IPv4",
          "ESD_CGNAT_data_ff_egress_IPv6"
     ],
     "currentPollCount":855
}

Get Service Analyzer Collection Data

This request API lists all the collection data details for a particular SDG device, service type, packet type, and flow direction.

URI

/api/sgd/monitoring/service-analyzer/
getCollectionData

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
getCollectionData
+json;version=1;charset=UTF-8

Parameters

{sdgId} - SDG device Id (eg., 33324)
{serviceType} – Type of the SDG Service (CGNAT, TLB, ADC) {packetType} – Type of the packet (Control/Data)
{protocolType} – Type of the protocol (IPv4/IPv6)
{flowDirection} – Flow Direction (ff/rf – Forward Flow/Reverse Flow)
{collectionFromTime} – Collection beginning time {start} – start 0

Consumes

None

Produces

Service analyzer instance collection data

Output

Sample JSON Output

{
     "data": [
     {
          "collectionTime":1415679757055,
          "ingressPacketCount":463046,
          "egressPacketCount":470077,
          "ingressByteCount":24160149,
          "egressByteCount":24689642
     },
     {
          "collectionTime":1415679678192,
          "ingressPacketCount":462433,
          "egressPacketCount":469461,
          "ingressByteCount":24128159,
          "egressByteCount":24657280
     },
     {
          "collectionTime":1415679603522,
          "ingressPacketCount":461866,
          "egressPacketCount":468883,
          "ingressByteCount":24098599,
          "egressByteCount":24626918
     },
     {
          "collectionTime":1415679527840,
          "ingressPacketCount":461281,
          "egressPacketCount":468285,
          "ingressByteCount":24068065,
          "egressByteCount":24595511
     }],
     "sdgId":33161,
     "sdgName":"mobrg480m",
     "serviceType":"CGNAT"
} 

Stop a Service Analyzer Instance

This request enables you to stop a running service analyzer instance for a particular SDG device and service type.

URI

/api/sgd/monitoring/service-analyzer/
stopServiceAnalyzerInstances

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
stopServiceAnalyzerInstances
+json;version=1;charset=UTF-8

Parameters

{sdgId} - SDG device Id (eg., 33324)
{serviceInstanceName} – Service Instance Name
{serviceType} - Type of the SDG Service (CGNAT, TLB, ADC)

Consumes

None

Produces

Stops a service analyzer instance

Delete a Service Analyzer Instance

This request enables you to delete a running service analyzer instance for a particular SDG device and service type.

URI

/api/sgd/monitoring/service-analyzer/
deleteServiceAnalyzerInstances

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sgd.monitoring
deleteServiceAnalyzerInstances
+json;version=1;charset=UTF-8

Parameters

{sdgId} - SDG device Id (eg., 33324)
{serviceInstanceName} – Service Instance Name
{serviceType} - Type of the SDG Service (CGNAT, TLB, ADC)

Consumes

None

Produces

Deletes a service analyzer instance

Modified: 2016-08-02