Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    GRE Services Management RESTful Web Services

    The following operations can be performed using the Connectivity Services Director GRE Services Management RESTful Web Services.

    Get a Full-Mesh GRE Service By Service ID

    This request is used to retrieve the details of a particular GRE service.

    URI

    api/space/nsas/gre/service-management/
    services/<serviceId>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.service-management.
    services+xml

    Produces

    Collects the details of a specific GRE service.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<Service href="/api/space/nsas/gre/service-management/services/98313"
    			uri="/api/space/nsas/gre/service-management/services/98313" key="98313">
    			<Common>
    				<Name>GRE_FULLMESH</Name>
    				<Identity>98313</Identity>
    				<State>Deployed</State>
    				<CreatedDate>2013-04-23T10:49:45.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-04-23T10:49:45.000+05:30</LastUpdatedDate>
    			</Common>
    			<ServiceType>GRE</ServiceType>
    			<StaticRoute>Enabled</StaticRoute>
    			<GRETunnelSettings>
    				<GRETunnelSetting>
    					<SourceRouter>
    						<DeviceName>embassy</DeviceName>
    						<DeviceId>65588</DeviceId>
    						<Interface>gr-1/0/10.1</Interface>
    					</SourceRouter>
    					<DestinationRouter>
    						<DeviceName>exora</DeviceName>
    						<DeviceId>65624</DeviceId>
    						<Interface>gr-1/2/0.1</Interface>
    					</DestinationRouter>
    				</GRETunnelSetting>
    				<GRETunnelSetting>
    					<SourceRouter>
    						<DeviceName>exora</DeviceName>
    						<DeviceId>65624</DeviceId>
    						<Interface>gr-1/2/0.1</Interface>
    					</SourceRouter>
    					<DestinationRouter>
    						<DeviceName>embassy</DeviceName>
    						<DeviceId>65588</DeviceId>
    						<Interface>gr-1/0/10.1</Interface>
    					</DestinationRouter>
    				</GRETunnelSetting>
    			</GRETunnelSettings>
    			<Reference>
    				<ServiceOrder key="98313"
    					href="/api/space/nsas/gre/service-management/service-orders/98313"
    					uri="/api/space/nsas/gre/service-management/service-orders/98313" />
    				<ServiceDefinition>
    					<ServiceDefinitionID key="32768"
    						href="/api/space/nsas/gre/service-management/service-definitions/32768"
    						uri="/api/space/nsas/gre/service-management/service-definitions/32768" />
    				</ServiceDefinition>
    			</Reference>
    		</Service>
    	</ServiceResource>
    </Data>
    
    

    Get a Hub-and-Spoke GRE Service By Service ID

    This request is used to retrieve the details of a particular GRE service.

    URI

    api/space/nsas/gre/service-management/
    services/<serviceId>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.service-management.services+xml

    Produces

    Collects the details of a specific GRE service.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<Service href="/api/space/nsas/gre/service-management/services/131101"
    			uri="/api/space/nsas/gre/service-management/services/131101" key="131101">
    			<Common>
    				<Name>GRE_HS_001</Name>
    				<Identity>131101</Identity>
    				<State>Deployed</State>
    				<CreatedDate>2013-04-24T12:49:40.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-04-24T12:49:40.000+05:30</LastUpdatedDate>
    			</Common>
    			<ServiceType>GRE</ServiceType>
    			<StaticRoute>Disabled</StaticRoute>
    			<GRETunnelSettings>
    				<GRETunnelSetting>
    					<Hub>
    						<DeviceName>embassy</DeviceName>
    						<DeviceId>65588</DeviceId>
    						<Interface>gr-1/0/10.1</Interface>
    					</Hub>
    					<Spoke>
    						<DeviceName>exora</DeviceName>
    						<DeviceId>65624</DeviceId>
    						<Interface>gr-1/2/0.1</Interface>
    					</Spoke>
    				</GRETunnelSetting>
    			</GRETunnelSettings>
    			<Reference>
    				<ServiceOrder key="131101"
    					href="/api/space/nsas/gre/service-management/service-orders/131101"
    					uri="/api/space/nsas/gre/service-management/service-orders/131101" />
    				<ServiceDefinition>
    					<ServiceDefinitionID key="32771"
    						href="/api/space/nsas/gre/service-management/service-definitions/32771"
    						uri="/api/space/nsas/gre/service-management/service-definitions/32771" />
    				</ServiceDefinition>
    			</Reference>
    		</Service>
    	</ServiceResource>
    </Data>
    
    

    Get All GRE Services

    This request is used to retrieve all the configured GRE services.

    URI

    api/space/nsas/gre/service-management/services

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.service-management.
    servicesxml

    Produces

    Collects all the configured GRE services.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource size="2">
    		<Service href="/api/space/nsas/gre/service-management/services/98313"
    			uri="/api/space/nsas/gre/service-management/services/98313" key="98313">
    			<Common>
    				<Name>GRE_FULLMESH</Name>
    				<Identity>98313</Identity>
    				<State>Deployed</State>
    				<Comments>GRE_FULLMESH</Comments>
    				<CreatedDate>2013-04-23T10:49:45.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-04-23T10:49:45.000+05:30</LastUpdatedDate>
    			</Common>
    			<ServiceType>GRE</ServiceType>
    			<AuditFlag>
    				<FunctionalAudit>Pending</FunctionalAudit>
    				<FaultStatus>None</FaultStatus>
    			</AuditFlag>
    			<Reference>
    				<ServiceOrder key="98306"
    					href="/api/space/nsas/gre/service-management/service-orders/98306"
    					uri="/api/space/nsas/gre/service-management/service-orders/98306" />
    				<ServiceDefinition>
    					<ServiceDefinitionID key="32768"
    						href="/api/space/nsas/gre/service-management/service-definitions/32768"
    						uri="/api/space/nsas/gre/service-management/service-definitions/32768" />
    				</ServiceDefinition>
    			</Reference>
    		</Service>
    		<Service href="/api/space/nsas/gre/service-management/services/131101"
    			uri="/api/space/nsas/gre/service-management/services/131101" key="131101">
    			<Common>
    				<Name>GRE_HS_001</Name>
    				<Identity>131101</Identity>
    				<State>Deployed</State>
    				<Comments>GRE_HS_001</Comments>
    				<CreatedDate>2013-04-24T12:49:40.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-04-24T12:49:40.000+05:30</LastUpdatedDate>
    			</Common>
    			<ServiceType>GRE</ServiceType>
    			<AuditFlag>
    				<FunctionalAudit>Pending</FunctionalAudit>
    				<FaultStatus>None</FaultStatus>
    			</AuditFlag>
    			<Reference>
    				<ServiceOrder key="131094"
    					href="/api/space/nsas/gre/service-management/service-orders/131094"
    					uri="/api/space/nsas/gre/service-management/service-orders/131094" />
    				<ServiceDefinition>
    					<ServiceDefinitionID key="32771"
    						href="/api/space/nsas/gre/service-management/service-definitions/32771"
    						uri="/api/space/nsas/gre/service-management/service-definitions/32771" />
    				</ServiceDefinition>
    			</Reference>
    		</Service>
    	</ServiceResource>
    </Data>
    
    

    Modify a Full-Mesh GRE Service with Addition of a Tunnel

    This request is used to modify a full-mesh GRE service with addition of a tunnel.

    URI

    api/space/nsas/gre/service-management/
    services/{service-Id}/add-tunnels

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-
    management.
    modify-service+xml;version=2;charset=UTF-8

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-status+xml;version=2

    Produces

    Modifies a GRE service with addition of a tunnel.

    Input

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<ServiceOrder>
    			<Common>
    				<Name>GRE_FULL_005</Name>
    			</Common>
    			<ServiceEndPointGroup>
    				<SourceRouter>
    					<DeviceName>vjx-junos-m10-1-space</DeviceName>
    					<DeviceId>65850</DeviceId>
    					<Interface>gr-0/0/0</Interface>
    				</SourceRouter>
    			</ServiceEndPointGroup>
    		</ServiceOrder>
    	</ServiceResource>
    </Data>
    
    

    Modify a Hub-and-Spoke GRE Service with Addition of a Tunnel

    This request is used to modify a hub-and-spoke GRE service with addition of a tunnel.

    URI

    api/space/nsas/gre/service-management/
    services/{service-Id}/add-tunnels

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-
    management.
    modify-service+xml;version=2;charset=UTF-8

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-status+xml;version=2

    Produces

    Modifies a GRE service with addition of a tunnel.

    Input

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<ServiceOrder>
    			<Common>
    				<Name>GRE_HS_001</Name>
    			</Common>
    			<ServiceEndPointGroup>
    				<Hub>
    					<DeviceName>exora</DeviceName>
    					<DeviceId>65593</DeviceId>
    					<Interface>gr-1/2/0.1</Interface>
    				</Hub>
    				<Spoke>
    					<DeviceName>vjx-junos-m10-2-space</DeviceName>
    					<DeviceId>65538</DeviceId>
    					<Interface>gr-0/0/0.4</Interface>
    				</Spoke>
    			</ServiceEndPointGroup>
    		</ServiceOrder>
    	</ServiceResource>
    </Data>
    
    

    Modify a Full-Mesh GRE Service with Deletion of a Tunnel

    This request is used to modify a full-mesh GRE service with deletion of a tunnel.

    URI

    api/space/nsas/gre/service-management/
    services/{service-Id}/delete-tunnels

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-
    management.
    modify-service+xml

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-status+xml

    Produces

    Modifies a GRE service with deletion of a tunnel.

    Input

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<ServiceOrder>
    			<Common>
    				<Name>GRE_FULL_005</Name>
    			</Common>
    			<ServiceEndPointGroup>
    				<SourceRouter>
    					<DeviceName>vjx-junos-m10-1-space</DeviceName>
    					<DeviceId>65850</DeviceId>
    					<Interface>gr-0/0/0</Interface>
    				</SourceRouter>
    			</ServiceEndPointGroup>
    		</ServiceOrder>
    	</ServiceResource>
    </Data>
    
    

    Modify a Hub-and-Spoke GRE Service with Deletion of a Tunnel

    This request is used to modify a hub-and-spoke GRE service with deletion of a tunnel.

    URI

    api/space/nsas/gre/service-management/
    services/{service-Id}/delete-tunnels

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-
    management.modify-service+xml

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-status+xml

    Produces

    Modifies a GRE service with deletion of a tunnel.

    Input

    Sample XML Input

     <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<ServiceOrder>
    			<Common>
    				<Name>GRE_HS</Name>
    			</Common>
    			<ServiceEndPointGroup>
    				<Hub>
    					<DeviceName>amx-1100-a</DeviceName>
    					<DeviceId>66758</DeviceId>
    				</Hub>
    			</ServiceEndPointGroup>
    		</ServiceOrder>
    	</ServiceResource>
    </Data>
    

    Force-Deploy a GRE Service

    This request is used to forcibly deploy a previously created GRE service.

    URI

    api/space/nsas/gre/service-management/
    services/{serviceId}

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-management.
    modify-service+xml

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-status+xml

    The options must be specified in the Action Element inside OperationSpecificData. The various options are as follows:

    • DeployNow

    • DeployLater

    Produces

    Forcibly deploys a previously created GRE service.

    Input

    Sample XML Input

    <Data xmlns="services.schema.networkapi.jmp.juniper.net"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                   <CustomAction xsi:type="ServiceCustomActionType">
                               <Action>DeployNow</Action>
                     </CustomAction>
    </Data>
     
    

    Decommission a GRE Service Immediately

    This request is used to decommission a previously created GRE service immediately.

    URI

    api/space/nsas/gre/service-management/services/
    {serviceId}

    HTTP Method

    DELETE

    Content-Type

    application/vnd.net.juniper.space.service-management.service+xml

    Produces

    Decommissions a previously created GRE service immediately.

    Input

    Sample XML Input

    <Data>
    	<Status>
    		<Identity>
    			<Type>Service</Type>
    			<Value>163871</Value>
    		</Identity>
    		<Job>
    			<ID>1736704</ID>
    			<Status>INPROGRESS</Status>
    		</Job>
    		<Code>200</Code>
    		<Message>
    			Service Decommission was Successfully triggered. Please check the status
    			using the JOB ID.
    		</Message>
    	</Status>
    </Data>
    
    

    Sample XML Output

    Decommission a GRE Service Later

    This request is used to decommission a previously created GRE service at a later time.

    URI

    api/space/nsas/gre/service-management/
    services/{serviceId}

    HTTP Method

    DELETE

    Content-Type

    application/vnd.net.juniper.space.service-management.service+xml

    Produces

    Decommissions a previously created GRE service at a later time.

    Input

    Sample XML Input

    <Data xmlns="services.schema.networkapi.jmp.juniper.net"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <Identity>
                       <Type>Service</Type>
                        <Value>1540110</Value>
             </Identity>
    <CustomAction xsi:type="ServiceCustomActionType">
                    <Action>DecommissionLater</Action>
                   <ScheduledDateTime>2012-04-09T19:07:18.000+05:30</ScheduledDateTime>
    </CustomAction>
    </Data>
    
    

    Output

    Sample XML Output

    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<Status>
    		<Identity>
    			<Type>Service</Type>
    			<Value>1179679</Value>
    		</Identity>
    		<Job>
    			<ID>1998906</ID>
    			<Status>INPROGRESS</Status>
    		</Job>
    		<Code>200</Code>
    		<Message>Service Decommission was Successfully triggered. Please check
    			the status using the JOB ID.</Message>
    	</Status>
    </Data> 	
    
    

    Modified: 2017-09-13