/api/space/config-file-management/versions-diff

The following operation is supported on this resource:

  • POST - Get the differences between versions of a configuration file
POST /versions-diffVersion 1

This API is used to get the differences in content of two configuration file versions. If the x-date header is sent to the server in the request, the version-creation-time field in the response is formatted according to the x-date time zone and locale settings.

.

Sample Usage

POST /versions-diff


  • Sample Input XML:

    <versions-diff>
      <config-file-versions>
        <config-file-version href= "/api/space/config-file-management/config-files/1540111/config-file-versions/2"/>
        <config-file-version href= "/api/space/config-file-management/config-files/1540111/config-file-versions/1"/>
      </config-file-versions>
    </versions-diff>

  • Sample Output XML:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <versions-diff uri="/api/space/config-file-management/versions-diff">
        <config-file-versions>
          <config-file-version uri= "/api/space/config-file-management/config-files/1540111/config-file-versions/2" *
    href="/api/space/config-file-management/config-files/1540111/config-file-versions/2" >
          <id>1540111</id>
          <versionId>2</versionId>
          <version-creation-time>20131106-141103-CST </version-creation-time>
        </config-file-version>
        <config-file-version uri= "/api/space/config-file-management/config-files/1540111/config-file-versions/1" href= "/api/space/config-file-management/config-files/1540111/config-file-versions/1">
          <id>1540111</id>
          <versionId>1</versionId>
          <version-creation-time>20131014-201911-CST </version-creation-time>
        </config-file-version>
      </config-file-versions>
      <diffs>
        <diff>
        <origLine>##1<configuration-text xmlns="http://xml.juniper.net/xnm/1.1/xnm" xmlns:junos="http://xml.juniper .net/junos/11.1R4/junos"></origLine>
        <reason>CHANGED</reason>
        <lineNumber>0</lineNumber>
        <newLine>##<configuration-text xmlns="http://xml.juniper.net/xnm/1.1/xnm" xmlns:junos="http://xml.juniper .net/junos/11.1R4/junos"></newLine>
        </diff>
      </diffs>
    </versions-diff>

  • Access Control

    The following capabilities are required to access this API: ViewConfigFilesCap