/api/space/script-management/scripts/{script-id}/view-associated-devices (v1)

The following operation is supported on this resource:

  • GET - Get list of Devices associated to the Script
GET /scripts/{script-id}/view-associated-devicesVersion 1

This API finds all available devices associated with a script and returns a list of them.

Sample Usage

GET /scripts/{script-id}/view-associated-devices


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    script-idintPathThe script ID used to get devices associated with a script Y
  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <script-device-associations size="2" uri="/api/space/script-management/scripts//163856/view-associated-devices">
       <script-device-association>
         <device href= "/api/space/device-management/devices/327690">
          <device-id>327690</device-id>
          <device-name>EX4200-20</device-name>
          <ip-address>192.168.27.20</ip-address>
         </device >
          <script-name>show-interfaces.slax</ script-name>
          <deployed-version>1.0</deployed-version >
          <script-status>ENABLED</script-status>
       </script-device-association>
       <script-device-association>
         <device href= "/api/space/device-management/devices/327694">
          <device-id>327694</device-id>
          <device-name>EX4200-200</device-name>
          <ip-address>192.168.27.200</ip-address>
         </device >
          <script-name>show-interfaces.slax</ script-name>
          <category>show-interfaces.slax</ category>
          <deployed-version>1.0</deployed-version >
          <script-status>ENABLED</script-status>
       </script-device-association>
    </script-device-associations>

  • Sample Output JSON:
    script-device-associations:
    {
    "@size": 2
    "@uri": /api/space/script-management/scripts/163856/view-associated-devices
    script-device-association:
    [
     {
     device:
     {
       "@href": /api/space/device-management/devices/327690
       device-id:327690
       device-name:EX4200-20
       ip-address:192.168.27.20
       },
       script-name:show-interfaces.slax
       deployed-version:1.0
       script-status:ENABLED
       },
     device:
     {
       "@href": /api/space/device-management/devices/327694
       device-id:327694
       device-name:EX4200-200
       ip-address:192.168.27.200
       },
       script-name:show-interfaces.slax
       category:sample
       deployed-version:1.0
       script-status:ENABLED
       }
    ]

  • Access Control

    The following capabilities are required to access this API: ViewAssociatedDevicesCap

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