Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How is Discovered Devices calculated on Discovery Home -
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How is Discovered Devices calculated on Discovery Home
KB0859499

How is Discovered Devices calculated on Discovery Home


609 Views Last updated : Jan 2, 2025 public Copy Permalink
KB Summary by Now Assist

Summary

This KB explains how Discovered Devices is calculated on Discovery Home, as showing in the screenshot below:



When clicking on Discovery > Home, the page is sending a request to REST API:  /api/now/discovery_result/homepage

> the REST API can be checked via: System Web Services > Scripted Web Services > Scripted REST APIs > Discovery Result > Get Homepage Stats

> can be tested via REST API Explorer


The API is doing below:

var manager = new DiscoveryResultManager();
var stats = manager.getHomepageStats();


From the script include DiscoveryResultManager, we can confirm below is how "Discovered Devices" is calculated:

 _getNumDiscoveredDevices: function() {
  var hardwareGr = new GlideRecord('cmdb_ci_hardware');
  hardwareGr.addQuery('last_discovered', '>=', gs.daysAgo(30));
  var srcQry = hardwareGr.addQuery('discovery_source', 'ServiceNow');
  srcQry.addOrCondition('discovery_source', 'CredentiallessDiscovery');
  hardwareGr.query();

  return hardwareGr.getRowCount();
 },


Please note, after clicking on the "Discovered Devices" box, a detailed report with CI classes is showing.

This report is not generated via REST API, but is an actual report. It can be checked via:

Reports > Administration > All > Discovered CIs



The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.