Skip to content

API Reference

Every function the sandbox exposes, grouped by what you’re trying to do. Each entry links to its full signature, parameters, and example.

Signal the end of a run and classify failures.

Publish what the driver collected: variables, tables, metrics, configuration backups, and driver parameters.

  • D.createBackup — Function createBackup
  • D.createExternalDevice — Creates an External IP device object
  • D.createMetric — Creates a custom driver metric to be sent in the D.success callback.
  • D.createTable — Creates a driver table for variable values visualization in a table format
  • D.createVariable — Creates a custom driver variable to be sent in the D.success callback.
  • D.getParameter — Get a predefined parameter during execution by its name.
  • Table.addMetrics — Adds a record with metrics data to the table
  • Table.getResult — Returns the prepared table definition and values in the current driver execution
  • Table.insertRecord — Inserts a record inside the Custom Driver table object.
  • Table.upsertRecord — Inserts or Updates a record inside the Custom Driver table object.
  • ConfigurationBackup — Custom Driver configuration backup Validated version is returned by D.createBackup, should be passed to D.success()
  • ConfigurationRestore — Custom Driver configuration restore Configuration backup to restore, should be passed to restore()
  • Metric — Custom Driver metric created via D.createMetric
  • MetricMetadata — Custom Driver metric metadata
  • Variable — Custom Driver variable created via D.createVariable

Call REST endpoints on the device.

Run commands over SSH and move files with SCP.

Drive legacy devices over raw Telnet or TCP.

Walk and set SNMP v1/v2c/v3 OIDs.

Execute PowerShell on Windows hosts.

Push or pull firmware via TFTP client or collector-hosted server.

  • D.device.tftpClient.download — Retrieves a file content from a remote server using TFTP.
  • D.device.tftpClient.upload — Transfers a file content to a remote server using TFTP.
  • D.tftpServer.accept — Start a TFTP server on network collector that is able to receive a single PUT request from a TFTP client on a file
  • D.tftpServer.serve — Start a TFTP server on network collector that is able to receive a single GET request from a TFTP client on a file

Read the target device’s IP, credentials, hostname, and metadata, or ping it.

Hash, HMAC, encrypt, and decrypt inside the sandbox.

Math, lodash, buffers, HTML parsing, console logging.

  • console.debug — Write the given message to the sandbox log (debug-level).
  • console.error — Write the given message to the sandbox log (error-level).
  • console.get — Returns the log message entries
  • console.info — Write the given message to the sandbox log (info-level).
  • console.warn — Write the given message to the sandbox log (warning-level).
  • D._unsafe.buffer.alloc — Allocates a new buffer of size bytes.
  • D._unsafe.buffer.concat — Returns a new Buffer which is the result of concatenating all the Buffer instances in the list together.
  • D._unsafe.buffer.from — Allocates a new Buffer using multiple types of input data (array, arrayBuffer, buffer, object, string)
  • D.math.percent — Percentage Calculating Function
  • D.htmlParse — Html Parser Library