REST Resources
-
/ -
/acknowledge-device-fingerprint -
/change-device-credentials -
/delete-device-discovery-rules -
/delete-devices -
/device-discovery-rules -
/device-discovery-rules /{id} -
/devices -
/devices /{device-id} /activate-modeled-device -
/devices /{device-id} /applicable-configlets -
/devices /{device-id} /apply-cli-configlet -
/devices /{device-id} /associated-softwares -
/devices /{device-id} /clone -
/devices /{device-id} /compute-configlet-parameter-values -
/devices /{device-id} /configlet -
/devices /{device-id} /configurations /expanded -
/devices /{device-id} /configurations /raw -
/devices /{device-id} /submit-cli-configlet -
/devices /{device-id} /validate-cli-configlet -
/devices /{deviceid} /customized-attribute-values -
/devices /{deviceid} /customized-attribute-values /{id} -
/devices /{id} -
/devices /{id} /associated-scripts -
/devices /{id} /change-requests -
/devices /{id} /configurations -
/devices /{id} /configurations /expanded /match-content -
/devices /{id} /configurations /raw /match-content -
/devices /{id} /connection-status -
/devices /{id} /exec-resync -
/devices /{id} /exec-rpc -
/devices /{id} /managed-elements -
/devices /{id} /managed-status -
/devices /{id} /modify-device-target-ip -
/devices /{id} /view-customized-attributes -
/discover-devices -
/discoveryresult /{id} -
/get-device-statistics -
/get-syslog-events -
/job-instances /{job-id} /acknowledge-fingerprint-job-results -
/job-instances /{job-id} /delete-devices-job-results -
/job-instances /{job-id} /discovery-job-results -
/job-instances /{job-id} /exec-rpc-job-results -
/job-instances /{job-id} /reboot-devices-job-results -
/job-instances /{job-id} /resync-devices-job-results -
/job-instances /{job-id} /rsa-key-transfer-job-results -
/reactivate-devices-from-rma -
/reboot-devices -
/resolve-key-conflict -
/resync-devices -
/stop-syslog-events -
/stop-syslog-events /{id} -
/upload-keys
/api/space/device-management/devices/{id}/exec-rpc (v1)
The following operation is supported on this resource:
- POST - Perform RPC operations on a device
POST /devices/{id}/exec-rpc | Version 1 |
This API is used to perform RPC operations on a device. It executes the different RPC commands after opening a channel to a device and it sets the status of executed RPC commmands. This API takes a device ID and a netconf transfer object containing the RPC command to perform.
The different versions of this API take the RPC in the following formats:
- Version 3 (Asynchronous): JSON version takes the RPC command in JSON format.
- Version 2 (Asynchronous): JSON version takes the RPC command in XML format.
- Version 1 (Synchronous): JSON version takes the RPC command in XML format.
Note: The RPC command to be executed must not contain any <
![CDATA[<rpc><get-system-information/><rpc/>]]
The following input is correct:
![CDATA[<get-system-information/>]]/p>.
Sample Usage
POST /devices/{id}/exec-rpc
-
Parameters:
Name Type URI Type Description Required device-id Integer Path The ID of the device on which to perform the RPC operation. Y
-
Content-Type Headers:
application/vnd.net.juniper.space.device-management.rpc+xml;version=1;charset=UTF-8
application/vnd.net.juniper.space.device-management.rpc+json;version=1;charset=UTF-8 -
Accept Headers:
application/vnd.net.juniper.space.device-management.rpc+xml;version=1
application/vnd.net.juniper.space.device-management.rpc+json;version=1
Using CDATA
<netconf>
<rpcCommands>
<rpcCommand>
<![CDATA[<get-system-information/>]]>
</rpcCommand>
</rpcCommands>
</netconf>
Using an Escape Sequence
<netconf>
<rpcCommands>
<rpcCommand>
<get-system-information/>
</rpcCommand>
</rpcCommands>
</netconf>
<netconf>
<status>Success</status>
<rpcCommands>
<rpcCommand>
<get-system-information/>
</rpcCommand>
</rpcCommands>
<netConfReplies>
<netConfReply>
<status>Success</status>
<replyMsgData>
<system-information>
<hardware-model>
srx100-lm</hardware-model>
<os-name>junos-es&
lt;/os-name>
<os-version>10.0R2
.10</os-version>
<serial-number>
AT5109AF0621</serial-number>
<host-name>hsc-
srx_200</host-name>
</system-information>
</replyMsgData>
</netConfReply>
</netConfReplies>
<deviceFamily>junos</deviceFamily>
<isCluster>false</isCluster>
<enableDiscardChanges>false</enableDiscardChanges>
<netconfConfirmedCommit>false</netconfConfirmedCommit>
</netconf>
{
"netconf":{
"rpcCommands":{
"rpcCommand": ["< get-system-information />"]
}
}
}
{
"netconf": {
"status":"Success",
"rpcCommands":{
"rpcCommand": "<get-system-information/>"
},
"netConfReplies":{
"netConfReply":{
"status":"Success",
"replyMsgData":"
<system-information>
<hardware-model>srx100-lm</hardware-model>
<os-name>junos-es</os-name>
<os-version>10.0R2.10</os-version>
<serial-number>AT5109AF0621</serial-number>
<host-name>hsc-srx_200</host-name>
</system-information>\n"
}
},
"deviceFamily":"junos",
"isCluster": false,
"enableDiscardChanges": false,
"netconfConfirmedCommit": false
}
}
Access Control
The following capabilities are required to access this API: OpenSSH
For the current version of this API, refer to :