Configuration Management API

/api/space/configuration-management/change-requests/{id}

The following operations are supported on this resource:

  • GET - Gets a single change request
  • PUT - Updates an existing change request

GET /api/space/configuration-management/change-requests/{id} (v1)


This API retrieves details of a change request for a given change request ID.

Access Control

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


Example Usage

GET /api/space/configuration-management/change-requests/{id}


Parameters

NameTypeURI TypeDescriptionRequired
idIntegerPath   Y

Content Types

  • 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 Output XML:
    <change-request>
       <device href="/api/space/device-management/devices/196609">
        <id>196609</id>
        <deviceFamily>junos-es</deviceFamily>
        <OSVersion>10.0R2.10</OSVersion>
        <platform>SRX100-LM</platform>
        <serialNumber>AT5109AF0621</serialNumber>
        <connectionStatus>up</connectionStatus>
        <ipAddr>192.168.21.9</ipAddr>
        <managedStatus>In Sync</managedStatus>
        <name>hsc-srx_200</name>
        <hostName>hsc-srx_200</hostName>
       </device>
       <name>TEST</name>
       <description>testDesc</description>
       <xmlData>
        <configuration>
         <groups>
          <name>JUNIPER_TEAM</name>
          <snmp><location>PVC LAB Test5</location></snmp>
         </groups>
        </configuration>
       </xmlData>
    </change-request>


  • Sample Output JSON:
    {
      "change-request": {
        "device": {
          "@href": "/api/space/device-management/devices/196609",
          "id": "196609",
          "deviceFamily": "junos-es",
          "OSVersion": "10.0R2.10",
          "platform": "SRX100-LM",
          "serialNumber": "AT5109AF0621",
          "connectionStatus": "up",
          "ipAddr": "192.168.21.9",
          "managedStatus": "In Sync",
          "name": "hsc-srx_200",
          "hostName": "hsc-srx_200"
        },
        "name": "TEST",
        "description": "testDesc",
        "xmlData": {
          "configuration": {
          "groups": {
            "name": "JUNIPER_TEAM",
            "snmp": { "location": "PVC LAB Test5" }
            }
          }
        }
      }
    }



PUT /api/space/configuration-management/change-requests/{id} (v1)


This API updates an existing change request based on the change request ID. The user will be not able to modify the change request if it has been executed already.

Access Control

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


Example Usage

PUT /api/space/configuration-management/change-requests/{id}


Parameters

NameTypeURI TypeDescriptionRequired
idIntegerPath   Y

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>
       <name>TEST_NAME</name>
       <description>TEST_DESC</description>
       <xmlData>
          <![CDATA[<config><loc>TEST_CONF </loc></config> ]]>
       </xmlData>
       <syncAfterPush>true</syncAfterPush>
    </change-request>


  • Sample Output XML:
    <change-request>
       <device href="/api/space/device-management/devices/196609">
        <id>196609</id>
        <deviceFamily>junos-es</deviceFamily>
        <OSVersion>10.0R2.10</OSVersion>
        <platform>SRX100-LM</platform>
        <serialNumber>AT5109AF0621</serialNumber>
        <connectionStatus>up</connectionStatus>
        <ipAddr>192.168.21.9</ipAddr>
        <managedStatus>In Sync</managedStatus>
        <name>hsc-srx_200</name>
        <hostName>hsc-srx_200</hostName>
       </device>
       <name>TEST</name>
       <description>testDesc</description>
       <xmlData>
        <configuration>
         <groups>
          <name>JUNIPER_TEAM</name>
          <snmp><location>PVC LAB Test5</location></snmp>
         </groups>
        </configuration>
       </xmlData>
    </change-request>


  • Sample Input JSON:
    {
      "change-request": {
        "name": "TEST_NAME",
        "description": "TEST_DESC",
        "xmlData": "
           "<config><loc>TEST_CONF</loc></config>"
        ",
        "syncAfterPush": "true"
      }
    }


  • Sample Output JSON:
    {
      "change-request": {
        "device": {
          "@href": "/api/space/device-management/devices/196609",
          "id": "196609",
          "deviceFamily": "junos-es",
          "OSVersion": "10.0R2.10",
          "platform": "SRX100-LM",
          "serialNumber": "AT5109AF0621",
          "connectionStatus": "up",
          "ipAddr": "192.168.21.9",
          "managedStatus": "In Sync",
          "name": "hsc-srx_200",
          "hostName": "hsc-srx_200"
        },
        "name": "TEST",
        "description": "testDesc",
        "xmlData": {
          "configuration": {
          "groups": {
            "name": "JUNIPER_TEAM",
            "snmp": { "location": "PVC LAB Test5" }
            }
          }
        }
      }
    }