NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

Devices → Count Devices by Device

AI-generated

Summary

Count devices matching a selected domain and device filter

Inputs

  • refreshOptions — Bypass cached dropdown values and fetch fresh options
  • v45Notice — This operation may require NetSapiens API v45+. It may not work on older server versions. Test to confirm.
  • domain (required) — Select a domain from the list; e.g., example.com
  • device (required) — Specify the device identifier or name
  • returnAll — Whether to fetch all results by paging through the API
  • start — Starting index for pagination when returnAll is false
  • limit — Number of results to return per page when returnAll is false

Output shape

a single numeric count of matching devices

If returnAll is false, pagination parameters (start, limit) control the slice; otherwise the full count is returned. The count is returned as an integer.

Examples

Example 1: Count devices in domain example.com using device identifier dev_001

domain: example.com, device: dev_001, returnAll: true

Example 2: Paginate through results for domain example.com, limit 50 per page

domain: example.com, device: dev_001, returnAll: false, start: 0, limit: 50

Example 3: Refresh dropdown cache before counting devices

refreshOptions: true, domain: example.com, device: dev_001

Links

Discussion