Configuration Management API

/api/space/configuration-management/change-requests (v1)

The following operations are supported on this resource:

  • POST - Creates a schedulable change request for a device - (Asynchronous Single-Change Request)

POST /api/space/configuration-management/change-requests (v1)


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

Access Control

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


Example Usage

Since this API makes an asynchronous method call, the user must specify a queue parameter with this API.

POST /api/space/configuration-management/change-requests?queue-url=<queue-url>&schedule-time=<schedule-time>

Note: It is assumed that the queue denoted by <queue-url> has, already, been created.



Parameters

NameTypeURI TypeDescriptionRequired
queue-urlURLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)Y
schedule-timecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N

Content Types

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


  • Produces content types:
    application/vnd.net.juniper.space.configuration-management.change-request+xml;version=1
    application/vnd.net.juniper.space.configuration-management.change-request+json;version=1


  • Sample Input XML:
    <change-request>
      <device href="/api/space/device-management/devices/458753" >
      </device>
     <name>TEST_NAME</name>
       <description>TEST_DESC</description>
     <xmlData>
     <![CDATA[

    Sample input for merging configuration elements

    <configuration>
     <interfaces>
      <interface>
      <name>so-3/0/0</name>
       <unit>
       <name>0</name>
        <family>
         <inet>
          <address>
           <name>10.0.0.1/8</name>
          </address>
         </inet>
        </family>
       </unit>
      </interface>
     </interfaces>
    </configuration>

    Sample input for replacing configuration elements


    <configuration>
     <system>
      <login>
       <class operation="replace">
        <name>operator</name>
        <permissions>configure</permissions>
        <permissions>admin-control</permissions>
       </class>
      </login>
     </system>
    </configuration>

    Sample input for creating configuration elements


    <configuration>
     <protocols>
      <ospf operation="create">
       <area>
       <name>0</name>
        <interface>
        <name>at-0/1/0.100</name>
        </interface>
       </area>
      </ospf>
     </protocols>
    </configuration>

    Sample input for deleting configuration elements


    <configuration>
     <system>
      <login>
       <user operation="delete">
        <name>barbara</name>
       </user>
      </login>
     </system>
    </configuration>
    ]]>
    </xmlData>
     <syncAfterPush>true</syncAfterPush> </change-request>


  • Sample Output XML:
    <task>
       <id>917507</id>
    </task>


  • Sample Input JSON:

    Sample Input for merging configuration elements:
    {
     "change-request":
      {
       "device":
        {
         "@href":"/api/space/device-management/devices/4587531"
        },
       "name":"TEST_NAME",
       "description":"TEST_DESC",
       "xmlData":"<configuration><interfaces>
            <interface><name>so-3/0/0</name>
            <unit>
              <name>0</name>
              <family><inet><address>
              <name>10.0.0.1/8</name></address>& lt;/inet>
              </family></unit></interface></ interfaces><
          /configuration>",
       "syncAfterPush":"true"
      }
    }

    Sample input for replacing configuration elements

    {
     "change-request":
      {
       "device":
        {
         "@href":"/api/space/device-management/devices/4587531"
        },
       "name":"TEST_NAME",
       "description":"TEST_DESC",
       "xmlData":"<configuration><system>
            <login><class operation=\"replace\">
            <name>operator</name><permissions> configure</permissions>
            <permissions>admin-control</permissions>& lt;/class></login>
            </system></configuration>"
       "syncAfterPush":"true"
      }
    }

    Sample input for creating configuration elements

    {
     "change-request":
      {
       "device":
        {
         "@href":"/api/space/device-management/devices/4587531"
        },
       "name":"TEST_NAME",
       "description":"TEST_DESC",
       "xmlData":"<configuration><protocols><ospf operation=\"create\"><area>
            <name>0</name><interface>
            <name>at-0/1/0.100</name></interface> ;
            </area></ospf></protocols></ configuration>",
       "syncAfterPush":"true"
      }
    }

    Sample input for deleting configuration elements

    {
     "change-request":
      {
       "device":
        {
         "@href":"/api/space/device-management/devices/4587531"
        },
       "name":"TEST_NAME",
       "description":"TEST_DESC",
       "xmlData":"<configuration><protocols><ospf operation=\"delete\"></protocols>
            </configuration>",
       "syncAfterPush":"true"
      }
    }


  • Sample Output JSON:
    {"task":{"id":917507}}



    For the current version of this API, refer to :
  • version 2