• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Podcast
  • Meetups
  • Archives
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp for Desktops
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp for VDI
  • Topics
  • Events
    • Logos & Wallpaper
    • ControlUp.com
  • Join

How to Retrieve Device Scores Through ControlUp’s API

Posted on November 3, 2025

A discussion on pulling device scores through automation in ControlUp’s API took place. An employee suggested a script for doing so at the given URL, as an alternative to using employee scores. The user testing this found a limitation in the number of devices returned, which was addressed by a team member. The method is trapped before it can be lost. Score!


Read the entire ‘How to Retrieve Device Scores Through ControlUp’s API’ thread below:

I’m looking at running some automation to pull out device score of devices so I can run some specific reporting that would work with some other internal processes inside a workflow. I can’t seem to do this via the List all devices API, has anyone built anything that can do this?


Device score isn’t stored (as far as I’m aware). The DEX (employee score) is.

Generally speaking the employee score is more useful since it is more geared towards people than the underlying hardware.

As in, do you care that your machines CPU is high if you’re not actively using the device? Maybe in some edge cases. But generally you don’t.

Having said that, if you’re trying to retrieve the device score via API, we can do that.

I just wanted to make sure we’re talking about the correct score


Yeah for me I want to measure device score rather than employee score as such as I want to measure device health and hopefully correlate that to end of life devices etc.


URL: https://api.controlup.com/edge/api/dal/_devices

Body:

“`{

"data_query": {

"track_scores": true,

"size": 10,

"from": 0,

"sort": [

{

"gpu_usage": "desc"

}

],

"query": {

"script_score": {

"query": {

"bool": {

"should": [],

"must": [

{

"term": {

"platform": {

"value": "1"

}

}

},

{

"range": {

"last_communication": {

"gt": 1762186057861

}

}

}

],

"must_not": []

}

},

"script": {

"source": "double score_divisor=1;double score=0;if(doc.containsKey(‘cpu_total_percentage’)&&doc[‘cpu_total_percentage’].size()!=0){score+=(doc[‘cpu_total_percentage’].value<=80)?10:Math.max(0,10-((doc[‘cpu_total_percentage’].value-80)/ 2f));} if(doc.containsKey(‘memory_total_bytes_available’)&&doc[‘memory_total_bytes_available’].size()!=0){float mb_available=doc[‘memory_total_bytes_available’].value / 1048576f;score+=(mb_available<100)?(mb_available / 10f):10;score_divisor++;} if(doc.containsKey(‘latency_result_1’)&&doc[‘latency_result_1’].size()!=0){score+=(doc[‘latency_result_1’].value<=50)?10:Math.max(0,10-((doc[‘latency_result_1’].value-50)/ 20f));score_divisor++;} if(doc.containsKey(‘wifi_signal’)&&doc[‘wifi_signal’].size()!=0&&doc[‘wifi_signal’].value>=0){score+=(doc[‘wifi_signal’].value>90)?10:Math.max(0,(doc[‘wifi_signal’].value-30)/ 6f);score_divisor++;} if(doc.containsKey(‘cpu_queue_length_history.keyword’)&&doc[‘cpu_queue_length_history.keyword’].size()!=0&&doc[‘platform’].value==1){String history=doc[‘cpu_queue_length_history.keyword’].value;int count=0;int pos=1;while(pos<(history.length()-1)){if(history.charAt(pos)==48&&(history.charAt(pos-1)==44||history.charAt(pos-1)==91)){count++;} pos++;} score+=10-Math.max(0, (10-(count2)));score_divisor++;} if(doc.containsKey(‘user_input_delay_max’)&&doc[‘user_input_delay_max’].size()!=0){score+=(doc[‘user_input_delay_max’].value<=1000)?10:Math.max(0,10-((doc[‘user_input_delay_max’].value-1000)/ 4000f));score_divisor++;} score=(score / score_divisor); if(doc.containsKey(‘app_crashes_history.keyword’)&&doc[‘app_crashes_history.keyword’].size()!=0){String history=doc[‘app_crashes_history.keyword’].value;int count=0;int pos=1;while(pos<(history.length()-1)){if(history.charAt(pos)!=48&&(history.charAt(pos-1)==44||history.charAt(pos-1)==91)){count++;} pos++;} score=Math.max(0,score-(count2));} if(doc.containsKey(‘user_logon_duration’)&&doc[‘user_logon_duration’].size()!=0){score = Math.max(0, score – Math.min(3, Math.max(0, (doc[‘user_logon_duration’].value – 3000) / 9000f)));} return score;"

}

}

}

},

"device_query": null,

"export": false

}“`


Thank you for this, that’s very helpful for me, only thing I have noticed it only returns 100 devices, do you run any pagination when running these?


Yup. Size and from near the top


Thank you 🙂

Continue reading and comment on the thread ‘How to Retrieve Device Scores Through ControlUp’s API’.  Not a member? Join Here!


Categories: All Archives, ControlUp for Desktops, ControlUp Scripts & Triggers
Topics: Automation, Automation & Alerting, CPU, GPU, Reporting, Scripts

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2025 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..