Device Management API

/api/space/device-management/devices/{id}/synch-config

The following operations are supported on this resource:

POST /api/space/device-management/devices/{id}/synch-config (v2)


This API is used to synchronize or import the configuration of a device.

Access Control

The following capabilities are required to access this API:
"DiscoverDevices"


Example Usage

POST /api/space/device-management/devices/{id}/synch-config


Parameters

NameTypeURI TypeDescriptionRequired
device-idIntegerPathThe ID of the device whose configuration will be synchronized or imported. Y

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.device-management.synch-configuration+xml;version=2;charset=UTF-8
    application/vnd.net.juniper.space.device-management.synch-configuration+json;version=2;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.device-management.synch-configuration+xml;version=2
    application/vnd.net.juniper.space.device-management.synch-configuration+json;version=2


  • Sample Input XML:

     <import-configuration>
       <device>
         <deviceFamily>junos</deviceFamily>
         <OSVersion>10.1R1.8</OSVersion>
         <platform>MX480</platform>
         <serialNumber>JN10c7b2bafd</serialNumber>
         <name>4.4.7.9</name>
         <id>4096005</id>
         <ipAddr>4.4.7.9</ipAddr>
       </device>
       <rawConfiguration>
          <![CDATA[<configuration><version>9.5R2.8</version></configuration>]]>
       </rawConfiguration>
       <configuration>
         <![CDATA[<configuration><version>9.5R2.8</version></configuration>]]>
       </configuration>
     </import-configuration>


  • Sample Output XML:

     <import-configuration>
       <device>
         <deviceFamily>junos</deviceFamily>
         <OSVersion>10.1R1.8</OSVersion>
         <platform>MX480</platform>
         <serialNumber>JN10c7b2bafd</serialNumber>
         <name>4.4.7.9</name>
         <id>4096005</id>
         <ipAddr>4.4.7.9</ipAddr>
       </device>
       <rawConfiguration>
          <![CDATA[<configuration><version>9.5R2.8</version></configuration>]]>
       </rawConfiguration>
       <configuration>
         <![CDATA[<configuration><version>9.5R2.8</version></configuration>]]>
       </configuration>
     </import-configuration>


  • Sample Input JSON:

    {
    import-configuration:
       {
       device:
          {
          "deviceFamily":"junos","platform":"MX480","serialNumber":"JN10e3ff1adf",
          "name":"4.4.8.1","id":"4390937","ipAddr":"4.4.8.1"
          },
       "configuration":"{'configuration': {'version':'10.1R2.8122'}}",
       "rawConfiguration":"{'configuration':{'version':'10.1R2.8122'}}"
       }
    }


  • Sample Output JSON:

    {
       import-configuration:
          device:{
          "deviceFamily":"junos",
          "platform":"MX480",
          "serialNumber":"JN10e3ff1adf",
          "name":"4.4.8.1",
          "id":"4390937",
          "ipAddr":"4.4.8.1",
          },
       "configuration":"{\"configuration\": {\"version\": \"10.1R2.8122\"}}",
       "rawConfiguration":"{\"configuration\": {\"version\": \"10.1R2.8122\"}}"
       "rawConfiguration":"{\"configuration\": {\"version\": \"10.1R2.8122\"}}"
    }



    For the deprecated versions of this API, refer to :
  • version 1