Downloading a script from the switch using the REST API

Instructions and examples in this document use an IP address that is reserved for documentation,, as an example of the IP address for the switch. To access your switch, you must use the IP address or hostname of that switch.


You must be logged in to the switch REST API.

Use the GET method on the URI of the script.

This example downloads script named com.arubanetworks.mac_arp_count_monitor.


The following example is the response body for the request. The entire script is returned in base64 format. Because of its length, the example shows only part of the script.

  "author": "Aruba Networks",
  "description": "Agent to monitor MAC address learned on a given VLAN and number of neighbors learned using ARP",
  "expert_only": false,
  "nae_parameters": {
    "Vlan_Id": "/rest/v1/system/nae_scripts/mac_arp_count_monitor/nae_parameters/Vlan_Id"
  "name": "mac_arp_count_monitor",
  "origin": "user",
  "script": "IyAtKi0gY29XBUCAgICpdGRvcih1cmky...LCAnQVJQIFRhYmxlIENvdW50JykK",
  "status": {
    "state": "VALIDATED"
  "version": "1.0"