/api/space/configuration-management/change-requests

The following operations are supported on this resource:

  • GET - Gets all change requests
  • POST - Creates a change request for a device. (This is a synchronous request.)
  • POST - Creates multiple change requests for one or more devices. (This is a synchronous request.)
  • POST - Creates schedulable multiple change requests for one or more devices. (This is an asynchronous request.)
GET /change-requestsVersion 3

This API retrieves all change requests present in the system.

Sample Usage

GET /change-requests


  • Sample Output XML:
    <change-requests size="1" uri="/api/space/configuration-management/change-requests">
       <change-request key="790" uri="/configuration-management/change-requests/790">
         <deviceId>8</deviceId>
         <name>ChangeRequestName_1</name>
         <description>testDesc_1</description>
       </change-request>
       <change-request key="791" uri="/configuration-management/change-requests/791">
         <deviceId>80</deviceId>
         <name>ChangeRequestName_2</name>
         <description>testDesc_2</description>
       </change-request>
    </change-requests>

  • Sample Output JSON:
    {
      "change-requests": {
        "@size": "1",
        "@uri": "/api/space/configuration-management/change-requests",
        "change-request": [
          {
            "@key": "790",
            "@uri": "/configuration-management/change-requests/790",
            "deviceId": "8",
            "name": "ChangeRequestName_1",
            "description" : "testDesc_1"
          },
          {
          "@key": "791",
          "@uri": "/configuration-management/change-requests/791",
          "deviceId": "80",
          "name": "ChangeRequestName_2",
          "description": "testDesc_2"
          }
        ]
      }
    }

  • Access Control

    The following capabilities are required to access this API: ViewChangeRequestsCap

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

    POST /change-requestsVersion 2

    This API creates a change request for a particular device based on input parameters. This API is a synchronous API.

    Note: If the client does not provide an accept header, this synchronous API is called by default.

    To execute this API asynchronously, you need an Accept header similar to the following:

      Accept application/vnd.net.juniper.space.job-managemnt.task+xml;version=1.

    Sample Usage

    POST /change-requests


  • Sample Input XML:

    <change-request>
      <name>TEST_NAME</name>
      <description>TEST_DESC</description>
      <xmlData>
        <![CDATA[
          <configuration>
    ??      <system>
    ??        <host-name>host- srx_100_updated</host-name>
    ??      </system>
         </configuration>
        ]]>
      </xmlData>
      <device href="/api/space/device-management/devices/229377"/>
    ??  <syncAfterPush>true</syncAfterPush>
    ??</change-request>

  • Sample Output XML:

    <change-request uri="/api/space/configuration-management/change-requests/223344">
      <name>TEST_NAME</name>
      <description>TEST_DESC</description>
      <xmlData>
        <![CDATA[
          <configuration>
    ??        <system>
    ??          <host-name>host- srx_100_updated</host-name>
    ??        </system>
          </configuration>

        ]]>
      </xmlData>
      <device href="/api/space/device-management/devices/229377"/>
    ??  <syncAfterPush>true</syncAfterPush>
      <result>
        Status: Success, ResultMessage: updateEditConfig Results
        lock Success. edit-config Success. commit Success. unlock Success.
        rpc-reply:
        <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
        <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
        <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
        <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
      </result>
    </change-request>

  • Sample Input JSON:

    {
    ??  "change-request":{
    ??    "name":"TEST_NAME",
    ??    "description":"TEST_DESC",
    ??    "xmlData":
          "<configuration>
            <system>
              <host-name>host- srx_100_updated</host-name>
            </system></configuration> ;",
    ??    "device":{
    ??      "@href": "/api/space/device-management/devices/229377"
    ??    },
    ??    "syncAfterPush":"true"
    ??  }

  • Sample Output JSON:
    {
    "change-request":
    {
      "@uri":"/api/space/configuration-management/change-requests/223344",
      "name":"TEST_NAME",
      "description":"TEST_DESC",
      "xmlData":
        "<configuration>
          <system>
            <host-name>host- srx_100_updated</host-name>
          </system>
        </configuration>",
        "device":{
          "@href": "/api/space/device-management/devices/229377"},
          "syncAfterPush":true,
          "result":"Status: Success, ResultMessage: updateEditConfig Results
           lock Success.edit-config Success.commit Success.unlock Success.
    rpc-reply:
    <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
    <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
    <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
    <rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>"


  • Access Control

    The following capabilities are required to access this API: ExecuteChangeRequestsCap

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

    POST /change-requestsVersion 2

    This API can create multiple change requests for one or more devices based on input parameters. This is a synchronous API.

    Note: If the client does not provide an accept header, this synchronous API is called by default.

    Sample Usage

    POST /change-requests


  • Sample Input XML:

    <change-requests>
      <change-request>
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <![CDATA[
            <configuration>
              <system>
                <syslog> ;
                  & lt;file>
                  & nbsp; <name>messages</name>
                  & nbsp; <contents>
                  & nbsp;   <name>authorization</name>
                  & nbsp;   <info/>
                  & nbsp; </contents>
                  & lt;/file>
                </syslog& gt;
              </system>
            </configuration>
          ]]>
        </xmlData>
        <device href="/api/space/device-management/devices/229377"/>
    ??      <syncAfterPush>true</syncAfterPush>
    ??  </change-request>
      <change-request>
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <![CDATA[
            <configuration>
              <system>
                <syslog> ;
                  & lt;file>
                  & nbsp;<name>messages</name>
                  & nbsp;<contents>
                  & nbsp;   <name>authorization</name>
                  & nbsp;  <info/>
                  & nbsp;</contents>
                  & lt;/file>
                </syslog& gt;
              </system>
            </configuration>
          ]]>
        </xmlData>
        <device href="/api/space/device-management/devices/229378"/>
    ??    <syncAfterPush>true</syncAfterPush>
    ??  </change-request>
    ??</change-requests>

  • Sample Output XML:

    <change-requests uri="/api/space/configuration-management/change-requests">
      <change-request href="/api/space/configuration-management/change-requests/950274">
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <configuration><system><syslog> ;<file><name>messages</name><contents><name> authorization </name><info/></contents></file></syslog>& lt;/system></configuration>
        </xmlData>
        <device href="/api/space/device-management/devices/229377"/>
    ??      <syncAfterPush>true</syncAfterPush> ;
          <result>
            <status>Success</status>
            <message>updateEditConfig Results lock Success. edit-config Success. commit Success. unlock Success.</message>
            <rpc-reply>
              <rpc-reply><rpc -reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
              <rpc-reply><rpc -reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
              <rpc-reply><rpc -reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
              <rpc-reply><rpc -reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            </rpc-reply>
          </result>
    ??  </change-request>
      <change-request href="/api/space/configuration-management/change-requests/950275">
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <configuration><system><syslog> ;<file><name>messages</name><contents><name> authorization </name><info/></contents></file></syslog>& lt;/system></configuration>
        </xmlData>
        <device href="/api/space/device-management/devices/229378"/>
    ??    <syncAfterPush>true</syncAfterPush>
        <result>
          <status>Success</status>
          <message>updateEditConfig Results lock Success. edit-config Success. commit Success. unlock Success.</message>
          <rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
          </rpc-reply>
        </result>
    ??  </change-request>
    ??</change-requests>

  • Sample Input JSON:
    {
    ??"change-requests":{
    ??  "change-request":[{
    ??    "name":"TEST_NAME",
    ??    "description":"TEST_DESC",
    ??    "xmlData":
          "<configuration>
            <system>
              <syslog>
                <file>
                   <name>messages</name>
                   <contents>
                     <name>authorization</name>
                     <info/>
                   </contents>
                </file> ;
              </syslog>
            </system>
          </configuration>",
    ??    "device":{
    ??      "@href": "/api/space/device-management/devices/229377"
    ??    },
    ??    "syncAfterPush":"true"
    ??    },
    ??    {
    ??      "name":"TEST_NAME",
    ??      "description":"TEST_DESC",
    ??      "xmlData":
            "<configuration>
              <system>
                <syslog& gt;
                   <file>
                     <name>messages</name>
                      <contents>
                        <name>authorization</name>
                          <info/>
                      </contents>
                   </file>
                </syslog& gt;
              </system>
            </configuration>",
    ??      "device":{
    ??        "@href": "/api/space/device-management/devices/229378"
    ??      },
    ??      "syncAfterPush":"true"
    ??    }]
    ??  }

  • Sample Output JSON:

    {
    ??  "change-requests":{
        "@uri": "/api/space/configuration-management/change-requests",
    ??    "change-request":[{
          "@href": "/api/space/configuration-management/change-requests/950274",
    ??      "name":"TEST_NAME",
    ??      "description":"TEST_DESC",
    ??      "xmlData":
            "<configuration>
              <system>
                <syslog& gt;
                   ;<file>
                   ;  <name>messages</name>
                   ;  <contents>
                   ;    <name>authorization</name>
                   ;    <info/>
                   ;  </contents>
                   ;</file>
                </syslog >
              </system>
            </configuration>",
    ??      "device":{
    ??        "@href": "/api/space/device-management/devices/229377"
    ??      },
    ??      "syncAfterPush":"true",
          "result":{
            "status": "Success",
            "message": updateEditConfig Results, lock Success.edit-config Success.commit Success.unlock Success.
            "rpc-reply":
             "<rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>"
          }
    ??    },
    ??    {
          "@href": "/api/space/configuration-management/change-requests/950275",
    ??      "name":"TEST_NAME",
    ??      "description":"TEST_DESC",
    ??      "xmlData": "<configuration><system><syslog><file><name>messages</name><contents><name>authorization</name><info/></contents></file></syslog></system></configuration>" ,
    ??      "device":{
    ??        "@href": "/api/space/device-management/devices/229377"
    ??      },
    ??      "syncAfterPush":"true",
          "result":{
            "status": "Success",
            "message": updateEditConfig Results, lock Success.edit-config Success.commit Success.unlock Success.
            "rpc-reply":
             "<rpc-reply><rpc-reply><ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>
            <rpc-reply><rpc-reply>& lt;ok xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/11.2R1/junos" /></rpc-reply></rpc-reply>"
          }
    ??    }]
    ??  }

  • Access Control

    The following capabilities are required to access this API: ExecuteChangeRequestsCap

    POST /change-requestsVersion 2

    This API can create schedulable multiple change requests for one or more devices based on input parameters. This is an asynchronous API.

    Note: If the client does not provide an accept header, this synchronous API is called by default.

    Sample Usage

    This API makes an asynchronous method call, so you can, optionally, specify queue and schedule parameters:

    POST /change-requests?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
      schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Input XML:

    <change-requests>
      <change-request>
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <![CDATA[
            <configuration>
              <system><
                syslog>< ;
                  & lt;file>
                  & nbsp; <name>messages</name>
                  & nbsp; <contents>
                  & nbsp;   <name>authorization</name>
                  & nbsp;   <info/>
                  & nbsp; </contents>
                  & lt;/file>
                </syslog& gt;
              </system>
             </configuration>
          ]]>
        </xmlData>
        <device href="/api/space/device-management/devices/229377"/>
    ??      <syncAfterPush>true</syncAfterPush>
    ??  </change-request>
      <change-request>
        <name>TEST_NAME</name>
        <description>TEST_DESC</description>
        <xmlData>
          <![CDATA[
            <configuration>
              <system>
                <syslog> ;
                  & lt;file>
                  & nbsp; <name>messages</name>
                  & nbsp; <contents>
                  & nbsp;   <name>authorization</name>
                  & nbsp;   <info/>
                  & nbsp; </contents>
                  & lt;/file>
                </syslog& gt;
              </system>
            </configuration>
          ]]>
        </xmlData>
        <device href="/api/space/device-management/devices/229378"/>
    ??    <syncAfterPush>true</syncAfterPush>
    ??  </change-request>
    ??</change-requests>

  • Sample Output XML:

    <task href="/api/space/job-management/jobs/688132">
      <id>917507</id>
    </task>

  • Sample Input JSON:

    {
    ??"change-requests":{
    ??  "change-request":[{
    ??  "name":"TEST_NAME",
    ??  "description":"TEST_DESC",
    ??  "xmlData":
        "<configuration>
          <system>
            <syslog>
              <file>
                <name> messages</name>
                <contents >
                   <name>authorization</name>
                   <info/>
                </ contents>
              </file>
            </syslog>
          </system>
        </configuration>",
    ??  "device":{
    ??    "@href":"/api/space/device-management/devices/229377"
    ??  },
    ??  "syncAfterPush":"true"
    ??  },
    ??  {
    ??    "name":"TEST_NAME",
    ??    "description":"TEST_DESC",
    ??    "xmlData":
          "<configuration>
            <system>
              <syslog>
                <file>
                   <name>messages</name>
                     <contents>
                       <name>authorization</name>
                       <info/>
                     </contents>
                </file> ;
              </syslog>
            </system>
          </configuration>",
    ??    "device":{
    ??      "@href": "/api/space/device-management/devices/229378"
    ??    },
    ??    "syncAfterPush":"true"
    ??  }]
    ??}

  • Sample Output JSON:

    {
      "task":{
        ""@href":"/api/space/job-management/jobs/688132",
        "id":917507
      }

  • Access Control

    The following capabilities are required to access this API: ExecuteChangeRequestsCap