Device Management API

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

The following operations are supported on this resource:

GET /api/space/device-management/devices/{id}/view-associated-scripts (v2)


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

Access Control

The following capabilities are required to access this API:
"ViewAssociatedScriptsCap"


Example Usage

GET /api/space/device-management/devices/{id}/view-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

Content Types

  • Produces content types:
    application/vnd.net.juniper.space.device-management.view-associated-scripts+xml;version=2
    application/vnd.net.juniper.space.device-management.view-associated-scripts+json;version=2


  • 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
       }
    ]
    }



    For other non-deprecated versions of this API, refer to :
  • version 1