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

    Provider Edge Device Management RESTful Web Services

    The following operations can be performed using the Connectivity Services Director Provider Edge (PE) Devices Management RESTful Web Services.

    Get All PE Devices

    This request is used to collect all the PE devices.

    URI

    api/space/nsas/device-roles/pe-devices

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.device-roles.
    pe-devices+xml

    Produces

    Retrieves all the PE devices that are managed and provisioned by the application.

    Output

    Sample XML Output

    <Data>
    <Devices size="11">
    	<Device href="/api/space/nsas/device-roles/pe-devices/1179927" uri="/api/space/nsas/device-roles/pe-devices/1179927" key="1179927">
    	<Common>
    		<Name>junos-m10-1-space</Name>
    		<Identity>1179927</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>368542</MEId>
    	</Device>
    	<Device href="/api/space/nsas/device-roles/pe-devices/1179964" uri="/api/space/nsas/device-roles/pe-devices/1179964" key="1179964">
    	<Common>
    		<Name>junos-m10-2-space</Name>
    		<Identity>1179964</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>368845</MEId>
    	</Device>
    	<Device href="/api/space/nsas/device-roles/pe-devices/1179891" uri="/api/space/nsas/device-roles/pe-devices/1179891" key="1179891">
    	<Common>
    		<Name>junos-mx240-space</Name>
    		<Identity>1179891</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>368173</MEId>
    	</Device>
    	<Device href="/api/space/nsas/device-roles/pe-devices/1179663" uri="/api/space/nsas/device-roles/pe-devices/1179663" key="1179663">
    	<Common>
    		<Name>junos-mx480-space</Name>
    		<Identity>1179663</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>360610</MEId>
    	</Device>
    	<Device href="/api/space/nsas/device-roles/pe-devices/1179752" uri="/api/space/nsas/device-roles/pe-devices/1179752" key="1179752">
    	<Common>
    		<Name>junos-mx80-1-space</Name>
    		<Identity>1179752</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>361763</MEId>
    	</Device>
    	<Device href="/api/space/nsas/device-roles/pe-devices/1194778" uri="/api/space/nsas/device-roles/pe-devices/1194778" key="1194778">
    	<Common>
    		<Name>junos-mx80-2-space</Name>
    		<Identity>1194778</Identity>
    	</Common>
    	<Role>N_PE</Role>
    	<MEId>374403</MEId>
    	</Device>
    </Devices>
    </Data>
    				

    Get PE Devices By Device ID

    This request is used to retrieve a PE device based on the device ID.

    URI

    api/space/nsas/device-roles/pe-devices/<pe-deviceID>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.device-roles.
    pe-devices+xml

    Produces

    Retrieves the PE device based on the device ID.

    Output

    Sample XML Output

    <Data>
    <Devices>
    	<Device href="/api/space/nsas/device-roles/pe-devices/21921857"
    		uri="/api/space/nsas/device-roles/pe-devices/21921857" key="21921857">
    		<Common>
    			<Name>exora</Name>
    			<Identity>21921857</Identity>
    		</Common>
    		<ManagementAddress>10.216.114.114</ManagementAddress>
    		<LoopBackAddress>50.1.2.3</LoopBackAddress>
    		<EMSDeviceIdentifier>6455605</EMSDeviceIdentifier>
    		<Role>N_PE</Role>
    		<MEId>6761450</MEId>
    		<Ports>
    			<Port>
    				<Name>at-0/2/0</Name>
    				<Id>21921859</Id>
    				<AdminStatus>up</AdminStatus>
    				<Encapsulation>none</Encapsulation>
    				<InterfaceIndex>520</InterfaceIndex>
    			</Port>
    			<Port>
    				<Name>lt-1/2/0</Name>
    				<Id>21921860</Id>
    				<AdminStatus>up</AdminStatus>
    				<Encapsulation>none</Encapsulation>
    				<InterfaceIndex>527</InterfaceIndex>
    			</Port>
    			<Port>
    				<Name>ge-1/3/0</Name>
    				<Id>21921861</Id>
    				<AdminStatus>down</AdminStatus>
    				<Encapsulation>flexible-ethernet-services</Encapsulation>
    				<InterfaceIndex>528</InterfaceIndex>
    			</Port>
    		</Ports>
    		<TunnelNames>
    			<RSVP>
    				<LSPTunnelName>Bulk_LSP_Test01</LSPTunnelName>
    			</RSVP>
    			<Static>
    				<LSPTunnelName>AutoMX6AutoMX4_exora_1</LSPTunnelName>
    				<LSPTunnelName>exora-to-jaipur</LSPTunnelName>
    				<LSPTunnelName>exora-to-embassy</LSPTunnelName>
    				<LSPTunnelName>exora-to-kochin</LSPTunnelName>
    				<LSPTunnelName>TestBulkLSPAudit_to_50_1_2_4</LSPTunnelName>
    				<LSPTunnelName>RSVP_LSP_Test01_to_30_1_2_7</LSPTunnelName>
    				<LSPTunnelName>Bulk_LSP_Test01_to_50_1_2_1</LSPTunnelName>
    				<LSPTunnelName>Test_to_50_1_2_1</LSPTunnelName>
    				<LSPTunnelName>Test_000_bulk_1_to_50_1_2_1</LSPTunnelName>
    			</Static>
    			<NonStatic>
    				<LSPTunnelName>exora-to-jaipur</LSPTunnelName>
    				<LSPTunnelName>exora-to-embassy</LSPTunnelName>
    				<LSPTunnelName>exora-to-kochin</LSPTunnelName>
    				<LSPTunnelName>TestBulkLSPAudit_to_50_1_2_4</LSPTunnelName>
    				<LSPTunnelName>RSVP_LSP_Test01_to_30_1_2_7</LSPTunnelName>
    				<LSPTunnelName>Bulk_LSP_Test01_to_50_1_2_1</LSPTunnelName>
    				<LSPTunnelName>Test_to_50_1_2_1</LSPTunnelName>
    				<LSPTunnelName>Test_000_bulk_1_to_50_1_2_1</LSPTunnelName>
    			</NonStatic>
    		</TunnelNames>
    	</Device>
    </Devices>
    </Data>
    
    				

    Get All Devices with Pagination, Search, and Filter

    This request is used to collect all the device details with paging behavior applied on the output, and with the devices sorted and segregated depending on the search criteria.

    URI

    api/space/nsas/device-roles/pe-
    devices?sortorder=desc&filteredby=name::space

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.device-roles.
    pe-devices+xml;version=2

    Produces

    Retrieves the filtered list of devices with pagination, based on the search criteria

    Note: If you enter “paging=(starteq 2, limit eq 3)”, which is not a single integer value, the display is according to index of records. In this case, it shows from the first indexed record to the third indexed record. If you enter "start=2&limit=3", it starts from the second record and displays the next three records in all.

    Output

    Sample XML Output

    <Data>
    
    
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Data xmlns="services.schema.networkapi.jmp.juniper.net">
        <Devices size="6">
        <Device key="557213" uri="/api/space/nsas/device-roles/pe-devices/557213" href="/api/space/nsas/device-roles/pe-devices/557213">
        <Common>
        <Name>junos-space5</Name>
        <Identity>557213</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>329152</MEId>
        </Device>
        <Device key="557236" uri="/api/space/nsas/device-roles/pe-devices/557236" href="/api/space/nsas/device-roles/pe-devices/557236">
        <Common>
        <Name>junos-space3</Name>
        <Identity>557236</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>329267</MEId>
        </Device>
        <Device key="557194" uri="/api/space/nsas/device-roles/pe-devices/557194" href="/api/space/nsas/device-roles/pe-devices/557194">
        <Common>
        <Name>junos-space1</Name>
        <Identity>557194</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>328355</MEId>
        </Device>
        <Device key="557142" uri="/api/space/nsas/device-roles/pe-devices/557142" href="/api/space/nsas/device-roles/pe-devices/557142">
        <Common>
        <Name>junos-mx80-1-space</Name>
        <Identity>557142</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>328182</MEId>
        </Device>
        <Device key="557069" uri="/api/space/nsas/device-roles/pe-devices/557069" href="/api/space/nsas/device-roles/pe-devices/557069">
        <Common>
        <Name>junos-mx480-space</Name>
        <Identity>557069</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>327736</MEId>
        </Device>
        <Device key="4390916" uri="/api/space/nsas/device-roles/pe-devices/4390916" href="/api/space/nsas/device-roles/pe-devices/4390916">
        <Common>
        <Name>junos-mx240-space</Name>
        <Identity>4390916</Identity>
        </Common>
        <Role>N_PE</Role>
        <MEId>4030920</MEId>
        </Device>
        </Devices>
        </Data>
    
    
    				

    Clear Interface Statistics

    This request is used to clear the statistical information collected for the interfaces.

    New Parameters

    api/space/nsas/clear-interface-statistics

    Description of the Changes

    This API clears interface statistics of an interface.

    URI

    api/space/nsas/clear-interface-statistics

    HTTP Method

    POST

    Consumes

    application/vnd.juniper.api.space.nsas.clear-interface-
    statistics-response+xml;version=2
    application/vnd.juniper.api.space.nsas.clear-interface-statistics-
    response+json;version=2

    Content Type

    application/vnd.juniper.api.space.nsas.clear-interface-
    statistics-request+xml;version=2;charset=UTF-8

    application/vnd.juniper.api.space.nsas.clear-interface-
    statistics-request+json;version=2;charset=UTF-8

    Produces

    Clears the statistics of interfaces.

    Input

    Sample XML Input

    <clear-interface-statistics-request>
         <reply-format>String</reply-format>
         <clear-device>Boolean</clear-device>
         <device-details>
               <device-details>
                   <device-name>String</device-name>
                   <interfaces total=""Integer"">
                         <interface>String</interface>
                   </interfaces>
                   <device-id>String</device-id>
               </device-details>
         </device-details>
         <service-name>String</service-name>
    </clear-interface-statistics-request>
    

    Output

    Sample XML Output

    <clear-interface-statistics-response uri=""/api/space/nsas/clear-interface-statistics"">
         <error-message>String</error-message>
         <reply-format>String</reply-format>
         <interface-name>String</interface-name>
         <domain-id>Integer</domain-id>
         <reply-status>OK</reply-status>
         <domain-name>String</domain-name>
         <service-type>String</service-type>
         <service-name>String</service-name>
    </clear-interface-statistics-response>"
    

    Perform an MPLS Ping for Point-to-Point, Layer 3 VPN, and VPLS Services

    This request is used to perform an MPLS ping operation for point-to-point, Layer 3 VPN, and VPLS services.

    New Parameters

    /api/space/nsas/perform-mpls-ping

    Description of the Changes

    This API is used to perform an MPLS ping process.

    URI

    /api/space/nsas/perform-mpls-ping

    HTTP Method

    POST

    Consumes

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    response+xml;version=2

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    response+json;version=2"

    Content Type

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    request+xml;version=2;charset=UTF-8

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    request+json;version=2;charset=UTF-8

    Produces

    Performs an MPLS ping operation for point-to-point, Layer 3 VPN, and VPLS services.

    Input

    Sample XML Input

    <perform-mpls-ping-request>
         <reply-format>String</reply-format>
         <forwarding-class>Integer</forwarding-class>
         <ping-size>Integer</ping-size>
         <reply-mode>String</reply-mode>
         <destination-device-name>String</destination-device-name>
         <ping-count>Integer</ping-count>
         <src-device-name>String</src-device-name>
         <sweep>Boolean</sweep>
         <service-name>String</service-name>
    </perform-mpls-ping-request>
    

    Output

    Sample XML Output

    <perform-mpls-ping-response uri=""/api/space/nsas/perform-mpls-ping"">
         <error-message>String</error-message>
         <reply-format>String</reply-format>
         <domain-id>Integer</domain-id>
         <reply-status>OK</reply-status>
         <domain-name>String</domain-name>
         <service-type>String</service-type>
         <ping-reply>String</ping-reply>
         <service-name>String</service-name>
    </perform-mpls-ping-response>"
    

    Perform an MPLS Ping for LSPs

    This request is used to perform an MPLS ping operation for LSPs.

    New Parameters

    /api/space/nsas/tunnels/perform-mpls-ping

    Description of the Changes

    This API is used to perform an MPLS ping process.

    URI

    /api/space/nsas/tunnels/perform-mpls-ping

    HTTP Method

    POST

    Consumes

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    response+xml;version=2

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    response+json;version=2"

    Content Type

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    request+xml;version=2;charset=UTF-8

    application/vnd.juniper.api.space.nsas.perform-mpls-ping-
    request+json;version=2;charset=UTF-8

    Produces

    Performs an MPLS ping operation for LSPs.

    Input

    Sample XML Input

    <perform-mpls-ping-request>
         <reply-format>String</reply-format>
         <forwarding-class>Integer</forwarding-class>
         <ping-size>Integer</ping-size>
         <reply-mode>String</reply-mode>
         <destination-device-name>String</destination-device-name>
         <ping-count>Integer</ping-count>
         <src-device-name>String</src-device-name>
         <sweep>Boolean</sweep>
         <service-name>String</service-name>
    </perform-mpls-ping-request>
    

    Output

    Sample XML Output

    <perform-mpls-ping-response uri=""/api/space/nsas/tunnels/perform-mpls-ping"">
         <error-message>String</error-message>
         <reply-format>String</reply-format>
         <domain-id>Integer</domain-id>
         <reply-status>OK</reply-status>
         <domain-name>String</domain-name>
         <service-type>String</service-type>
         <ping-reply>String</ping-reply>
         <service-name>String</service-name>
    </perform-mpls-ping-response>"
    

    Get All Saved Configlets for a Device

    This request is used to retrieve all the saved configlets for a particular device selected in Device view.

    URI

    /api/space/configuration-management/cli-configlets-
    saved/<device-id>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.configuration-management.cli-
    configlets+xml;version=3

    Produces

    Retrieves all the saved configlets for a particular device selected in Device view.

    Input

    Sample XML Input

    /api/space/configuration-management/cli-configlets-saved/for-device/45321 
    

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8"?>
    <cli-configlets-saved total="1" size="1" uri="/api/space/configuration-management/cli-configlets-saved/for-device/45321">
       <cli-configlet-saved key="327684">
          <name>sample_phy</name>
          <category>check</category>
          <reference-number>12</reference-number>
          <device-family>EX</device-family>
          <latestVersion>1.1</latestVersion>
          <last-modified-by>super</last-modified-by>
          <creation-time>Apr 9, 2013 3:39:28 PM</creation-time>
          <last-updated-time>Apr 9, 2013 6:35:23 PM</last-updated-time>
          <description>physical interface desc</description>
          <device-name>ARE1e</device-name>
          <interface-name>ge-1/0/0</interface-name>
          <validation-status-id>34562</validation-status-id>
          <export-job-status-id>45678</export-job-status-id>
       </cli-configlet-saved>
       <cli-configlet-saved key="327684">
          <name>sample_phy_1</name>
          <category>check</category>
          <reference-number>12</reference-number>
          <device-family>EX</device-family>
          <latestVersion>1.1</latestVersion>
          <last-modified-by>super</last-modified-by>
          <creation-time>Apr 9, 2013 3:39:28 PM</creation-time>
          <last-updated-time>Apr 9, 2013 6:35:23 PM</last-updated-time>
          <description>physical interface desc</description>
          <device-name>ARE1e</device-name>
          <interface-name>ge-1/0/0</interface-name>
          <validation-status-id>345624</validation-status-id>
          <export-job-status-id>456378</export-job-status-id>
       </cli-configlet-saved>
       <cli-configlet-saved key="327684">
          <name>sample_phy_12</name>
          <category>check</category>
          <reference-number>12</reference-number>
          <device-family>EX</device-family>
          <latestVersion>1.1</latestVersion>
          <last-modified-by>super</last-modified-by>
          <creation-time>Apr 9, 2013 3:39:28 PM</creation-time>
          <last-updated-time>Apr 9, 2013 6:35:23 PM</last-updated-time>
          <description>physical interface desc</description>
          <device-name>ARE1e</device-name>
          <interface-name>ge-1/0/0</interface-name>
          <validation-status-id>345562</validation-status-id>
          <export-job-status-id>456756</export-job-status-id>
       </cli-configlet-saved>
    </cli-configlets-saved>
    

    Get All Saved Configlets for a Template ID

    This request is used to retrieve all the saved configlets for a particular template ID.

    URI

    /api/space/configuration-management/cli-configlets-
    saved/<saved-template-id>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.configuration-management.cli-
    configlets+xml;version=3

    Produces

    Retrieves all the saved configlets for a specific template ID.

    Input

    Sample XML Input

     /api/space/configuration-management/cli-configlets-saved/327684 
    

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8"?>
    <cli-configlets-saved total="1" size="1" uri="/api/space/configuration-management/cli-configlets-saved/327684">
       <cli-configlet-saved key="327684">
          <name>sample_phy</name>
          <category>check</category>
          <reference-number>12</reference-number>
          <device-family>EX</device-family>
          <latestVersion>1.1</latestVersion>
          <last-modified-by>super</last-modified-by>
          <creation-time>Apr 9, 2013 3:39:28 PM</creation-time>
          <last-updated-time>Apr 9, 2013 6:35:23 PM</last-updated-time>
          <description>physical interface desc</description>
          <device-name>ARE1e</device-name>
          <interface-name>ge-1/0/0</interface-name>
          <validation-status-id>34562</validation-status-id>
          <export-job-status-id>45678</export-job-status-id>
          <cli-configlet-saved-pages>
             <cli-configlet-saved-page key="456236">
                <id>3145735</id>
                <page-number>1</page-number>
                <content />
             </cli-configlet-saved-page>
          </cli-configlet-saved-pages>
          <cli-configlet-params>
             <cli-configlet-param key="3670030">
                <parameter>variable</parameter>
                <default-value />
                <display-name>result-regex[4]</display-name>
                <id>4390919</id>
                <param-order>1</param-order>
                <param-type>READWRITE</param-type>
                <parameter>result-regex[4]</parameter>
                <xpath />
             </cli-configlet-param>
          </cli-configlet-params>
       </cli-configlet-saved>
    </cli-configlets-saved>

    Modified: 2017-09-13