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 Service Definitions Management RESTful Web Services

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

    Get All GRE Service Definitions

    This request is used to retrieve all the configured GRE service definitions.

    URI

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

    HTTP Method

    GET

    Consumes

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

    Produces

    Collects all the configured GRE service definitions.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource size="2">
    		<ServiceDefinition
    			href="/api/space/nsas/gre/service-management/service-definitions/69"
    			uri="/api/space/nsas/gre/service-management/service-definitions/69"
    			key="69">
    			<Common>
    				<Name>StdDef-GRE-FullMesh</Name>
    				<Identity>69</Identity>
    				<State>Published</State>
    				<CreatedDate>2013-10-01T05:59:58.000+05:30</CreatedDate>
    				<CreatedBy>super</CreatedBy>
    			</Common>
    			<ServiceType>GRE-Full Mesh</ServiceType>
    		</ServiceDefinition>
    		<ServiceDefinition
    			href="/api/space/nsas/gre/service-management/service-definitions/48"
    			uri="/api/space/nsas/gre/service-management/service-definitions/48"
    			key="48">
    			<Common>
    				<Name>StdDef-GRE-HubSpoke</Name>
    				<Identity>48</Identity>
    				<State>Published</State>
    				<CreatedDate>2013-10-01T05:59:58.000+05:30</CreatedDate>
    				<CreatedBy>super</CreatedBy>
    			</Common>
    			<ServiceType>GRE-Hub Spoke</ServiceType>
    		</ServiceDefinition>
    
    
    

    Get GRE Service Definition Details By Definition ID

    This request is used to retrieve the details of a particular Layer 2 Ethernet LAN VPLS BGP service definition, based on the service definition ID.

    URI

    api/space/nsas/gre/service-management/service-definitions/
    <servicedefinition-Id>

    HTTP Method

    GET

    Consumes

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

    Produces

    Collects the details of a specific GRE service definition.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<ServiceDefinition>
    			<Common>
    				<Name> StdDef-GRE-FullMesh </Name>
    				<Identity>69</Identity>
    				<State>Published</State>
    				<Comments>Predefined GRE action definition</Comments>
    				<CreatedDate>2013-10-01T05:59:58.000+05:30</CreatedDate>
    				<CreatedBy>super</CreatedBy>
    			</Common>
    			<TransportActivate  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GREType" >
    				<Topology>GRE - Full Mesh</Topology>				
    			</TransportActivate>
    		</ServiceDefinition>
    	</ServiceResource>
    </Data>
    
    

    Create a GRE Service Definition

    This request is used to create a GRE service definition.

    URI

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

    HTTP Method

    POST

    Content-Type

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

    Consumes

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

    Produces

    Creates a GRE service definition.

    Input

    Sample XML Input

        <Data xmlns="services.schema.networkapi.jmp.juniper.net">
        <ServiceResource>
        <ServiceDefinition>
        <Common>
              <Name>GRE_Test_Via_API01</Name>
              <Comments>GRE Service Definition creation</Comments>
          </Common>
    <ServiceElementConfigurationDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    				xsi:type="PTPServiceEndpointGroupParameterDefType"/>
    <ServiceEndPointConfigurationDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    				xsi:type="PTPEndPointParameterDefType"/>
        <TransportActivate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GREType">
        <Topology>GRE - Full Mesh</Topology>
        </TransportActivate>
        </ServiceDefinition>
        </ServiceResource>
        <CustomAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ServiceDefinitionCustomActionType">
    	        <Action>Publish</Action>
        </CustomAction>
        </Data>
    
    

    Output

    Sample XML Output

    	    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Data xmlns="services.schema.networkapi.jmp.juniper.net">
        <Status>
        <Identity>
        <Type>ServiceDefinition</Type>
        <Value>32839</Value>
        </Identity>
        <Code>200</Code>
        <Message>ServiceDefinition Created and Published Successfully</Message>
        </Status>
        </Data>
    	
    
    

    Publish and Unpublish a GRE Service Definition

    This request is used to publish or unpublish a GRE service definition.

    URI

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

    HTTP Method

    POST

    Content-Type

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

    Consumes

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

    Action types are Publish and Unpublish.

    Produces

    Publishes or unpublishes a GRE service definition.

    Input for Unpublishing a Service Definition

    Sample XML Input

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

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<Status>
    		<Identity>
    			<Type>ServiceDefinition</Type>
    			<Value>7012365</Value>
    		</Identity>
    		<Code>200</Code>
    		<Message>ServiceDefinition UnPublished Successfully</Message>
    	</Status>
    </Data>
     
    

    Input for Publishing a Service Definition

    Sample XML Input

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

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<Status>
    		<Identity>
    			<Type>ServiceDefinition</Type>
    			<Value>7012365</Value>
    		</Identity>
    		<Code>200</Code>
    		<Message>ServiceDefinition Published Successfully</Message>
    	</Status>
    </Data>
     
    

    Delete a GRE Service Definition

    This request is used to delete a previously configured GRE service definition.

    URI

    api/space/nsas/gre/service-management/service-definitions/
    <servicedefinition-id>

    HTTP Method

    DELETE

    Consumes

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

    Produces

    Deletes a GRE service definition.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<Status>
    		<Identity>
    			<Type>ServiceDefinition</Type>
    			<Value>7012365</Value>
    		</Identity>
    		<Code>200</Code>
    		<Message>ServiceDefinition Deleted Successfully</Message>
    	</Status>
    </Data>
     
    

    Modified: 2015-10-13