Skip to content

device

Device management commands for NDCLI. These commands allow you to list, approve, rename, and remove firewall devices in your organization.

CommandDescription
device listList devices
device describeShow device details
device connectConnect to a device via Pathfinder
device approveApprove a pending device
device approve-allApprove all pending devices
device renameRename a device
device removeRemove a device

List devices in your organization with optional filtering and sorting.

Terminal window
ndcli device list [flags]
FlagTypeDefaultDescription
--namestringFilter by name (regex pattern)
--statusstringFilter by status: PENDING, ENABLED, DISABLED
--oustringFilter by organizational unit
--created-afterstringFilter by created date
--created-beforestringFilter by created date
--heartbeat-afterstringFilter by last heartbeat
--heartbeat-beforestringFilter by last heartbeat
--synced-afterstringFilter by last sync
--synced-beforestringFilter by last sync
--drift-statusstringFilter by drift status: IN_SYNC, DRIFT, NEVER_SYNCED, UNKNOWN, ERROR
--sort-bystringname:ascSort field and direction
--pageint1Page number
--per-pageint30Items per page

Date filters accept two formats:

  1. Relative: 30m, 2h, 7d, 2w (minutes, hours, days, weeks ago)
  2. ISO 8601: 2024-01-15T10:30:00Z

Available sort fields: name, status, created_at, heartbeat, synced_at, drift_status

Direction: asc or desc (e.g., name:asc, created_at:desc)

Terminal window
ndcli device list
ndcli device list --status PENDING
ndcli device list --ou production
ndcli device list --heartbeat-before 7d
ndcli device list --created-after 24h
ndcli device list --name "fw-.*-prod"
ndcli device list --sort-by heartbeat:desc
ndcli device list --page 2 --per-page 50
ndcli device list --drift-status DRIFT
ndcli device list --drift-status DRIFT --ou production

Show detailed information about a specific device.

Terminal window
ndcli device describe [device]
ArgumentRequiredDescription
deviceYesDevice name

Shows comprehensive device information:

  • Device name and UUID
  • Status (PENDING, ENABLED, DISABLED)
  • Organizational unit assignment
  • Last heartbeat timestamp
  • Last sync timestamp and hash
  • Drift status (IN_SYNC, DRIFT, NEVER_SYNCED, UNKNOWN, ERROR)
  • Creation date
  • Hardware/software details
Terminal window
ndcli device describe my-firewall
ndcli device describe my-firewall -f json

Connect to a device interactively via Pathfinder. Opens a tunneled SSH session and optionally a local webadmin tunnel to the device’s web interface.

Terminal window
ndcli device connect [device] [flags]
ArgumentRequiredDescription
deviceYesDevice name
FlagTypeDefaultDescription
--timeoutduration5mConnection timeout
--webadmin-portintautoLocal port for the webadmin tunnel
--no-webadminboolfalseDisable the webadmin tunnel
Terminal window
# Connect with default settings
ndcli device connect my-firewall
# Connect with a custom timeout
ndcli device connect my-firewall --timeout 15m
# Connect without webadmin tunnel
ndcli device connect my-firewall --no-webadmin
# Connect with webadmin on a specific port
ndcli device connect my-firewall --webadmin-port 8443

Approve a pending device, allowing it to receive configurations and participate in the organization.

Terminal window
ndcli device approve [device]
ArgumentRequiredDescription
deviceYesDevice name to approve
Terminal window
ndcli device approve new-firewall
  • Only devices with PENDING status can be approved
  • After approval, the device status changes to ENABLED
  • Approved devices can receive configuration syncs

Approve all pending devices in the organization at once.

Terminal window
ndcli device approve-all
Terminal window
ndcli device approve-all

Rename a device.

Terminal window
ndcli device rename [device] [new-name]
ArgumentRequiredDescription
deviceYesCurrent device name
new-nameYesNew name for the device
Terminal window
ndcli device rename old-name new-name
  • Device names must be unique within the organization
  • The rename takes effect immediately
  • The device UUID remains unchanged

Remove a device from the organization.

Terminal window
ndcli device remove [device]
ArgumentRequiredDescription
deviceYesDevice name to remove
Terminal window
ndcli device remove decommissioned-firewall