/api/space/device-management/devices/{id}/associated-scripts

The following operations are supported on this resource:

  • GET - Get associated scripts of the device
  • GET - Get Scripts associated with the device
GET /devices/{id}/associated-scriptsVersion 1

This API finds all available scripts associated with a device and returns a list of them.

Sample Usage

GET /devices/{id}/associated-scripts


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    device-idIntegerPathThe ID of the device from which to get a list of scripts associated with the device. Y
  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <script-device-associations size="2" uri="/api/space/device-management/devices/327690/associated-scripts">
       <script-device-association>
         <script href= "/api/space/script-management/scripts/163856">
          <script-id>163856</script-id>
          <script-name>show-interfaces.slax</ script-name>
          <script-type>Op Script</script-type>
         </script >
          <device-name>Ex4200240</device-name>
          <deployed-version>1.0</deployed-version >
          <script-status>ENABLED</script-status& gt;
       </script-device-association>
       <script-device-association>
         <script href= "/api/space/script-management/scripts/163860">
          <script-id>163860</script-id>
          <script-name>ex-interface.slax</script- name>
          <script-type>Op Script</script-type>
         </script >
          <category>Ex4200240</category>
          <device-name>Ex4200240</device-name>
          <deployed-version>1.0</deployed-version >
          <script-status>ENABLED</script-status& gt;
       </script-device-association>
    </script-device-associations>

  • Sample Output JSON:
    script-device-associations:
    {
      @size: 2
      @uri: /api/space/device-management/devices/327690/associated-scripts
      script-device-association:[{
        script:{
          @href: /api/space/script-management/scripts/163856
          script-id:163856
          script-name:show-interfaces.slax
          script-type:Op Script
        },
        device-name:Ex4200240
        deployed-version:1.0
        script-status:ENABLED
        },
        script:{
          @href: /api/space/script-management/scripts/163860
          script-id:163860
         script-name:ex-interface.slax
         script-type:Op Script
        },
        device-name:Ex4200240
        deployed-version:1.0
        script-status:ENABLED
        }]

  • Access Control

    The following capabilities are required to access this API: ViewAssociatedScriptsCap

    GET /devices/{id}/associated-scriptsVersion 2

    This API finds all available scripts associated with a device and returns a list of the scripts.

    Sample Usage

    GET /devices/{id}/associated-scripts


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      device-idIntegerPathThe ID of the device from which to the get the list of scripts associated with the device. Y
  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <script-device-associations size="2" uri="/api/space/device-management/devices/327690/view-associated-scripts">
       <script-device-association>
         <script href="/api/space/script-management/scripts/163856">
          <script-id>163856</script-id>
          <script-name>show-interfaces.slax</script-name>
          <script-type>Op Script</script-type>
         </script >
          <device-name>Ex4200240</device-name>
          <deployed-version>1.0</deployed-version>
          <script-status>ENABLED</script-status>
       </script-device-association>
       <script-device-association>
         <script href="/api/space/script-management/scripts/163860">
          <script-id>163860</script-id>
          <script-name>ex-interface.slax</script-name>
          <script-type>Op Script</script-type>
         </script >
          <device-name>Ex4200240</device-name>
          <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/device-management/devices/327690/view-associated-scripts
      script-device-association:[{
        script:{
           @href: /api/space/script-management/scripts/163856
           script-id:163856
           script-name:show-interfaces.slax
           script-type:Op Script
        },
        device-name:Ex4200240
        deployed-version:1.0
        script-status:ENABLED
        },
        script:{
           @href: /api/space/script-management/scripts/163860
           script-id:163860
           script-name:ex-interface.slax
           script-type:Op Script
        },
        device-name:Ex4200240
        deployed-version:1.0
        script-status:ENABLED
      }]

  • Access Control

    The following capabilities are required to access this API: ViewAssociatedScriptsCap