REST Resources

/api/space/device-management/devices/{id}/exec-rpc (v2)

The following operation is supported on this resource:

  • POST - Create RPC request to be performed on device
POST /devices/{id}/exec-rpcVersion 2

This API creates a schedulable RPC request on the specified device. It executes the different RPC commands after opening a channel to the device and sets the status of executed RPC commmands. The API requires the device ID and a netconf transfer object that contains the RPC commands to be performed at the scheduled time.

Note: The RPC command to be executed must not contain any <rpc> tags. For example, the following is incorrect:

   ![CDATA[<rpc><get-system-information/><rpc/>]]

The following input is correct:

   ![CDATA[<get-system-information/>]]

.

Sample Usage

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

POST /devices/{id}/exec-rpc?queue=<queue>&schedule=<schedule>


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


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    device-idIntegerPathThe ID of the device on which to perform the RPC operation. Y
    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:

    Using CDATA
    <netconf>
      <rpcCommands>
        <rpcCommand>
          <![CDATA[<get-system-information/>]]>
        </rpcCommand>
      </rpcCommands>
    </netconf>

  • Sample Input XML:

    Using the Escape Sequence
    <netconf>
      <rpcCommands>
        <rpcCommand>
          <get-system-information/>
        </rpcCommand>
      </rpcCommands>
    </netconf>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/1212441">
      <id>1212441</id>
    </task>

  • Sample Input JSON:

    {
       "netconf":
         {
         "rpcCommands":{
           "rpcCommand": ["<get-system-information/>"]
          }
       }
    }

  • Sample Output JSON:
    {
      "task":{
        "@href":"/api/space/job-management/jobs/1212441",
        "id":1212441
      }
    }

  • Access Control

    The following capabilities are required to access this API: OpenSSH

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