REST Resources

/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:
    <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 >
          <script-category>Switch</script-category>
          <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 >
          <script-category>Switch</script-category>
          <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/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"
            },
            "script-category":"Switch",
            "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"
            },
            "script-category":"Switch",
            "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 >
          <script-category>Switch</script-category>
          <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 >
          <script-category>Router</script-category>
          <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"
            },
            "script-category":"Switch",
            "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"
            },
            "script-category":"Router",
            "device-name":"Ex4200240",
            "deployed-version":"1.0",
            "script-status":"ENABLED"
          }
        ]
      }
    }

  • Access Control

    The following capabilities are required to access this API: ViewAssociatedScriptsCap