PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates handling of paginated REST APIs, JSON parsing and nested-data filtering, month/year date parsing, and numeric threshold comparisons, reflecting skills in data retrieval and programmatic data manipulation.

  • Medium
  • Kneron
  • Data Manipulation (SQL/Python)
  • Software Engineer

Count IoT devices matching date and threshold

Company: Kneron

Role: Software Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Take-home Project

Implement function numDevices(statusQuery, threshold, dateStr) that returns the number of IoT devices from a paginated REST API that were added in the month and year given by dateStr (format MM-YYYY) and have operatingParams.rootThreshold > threshold. Query all pages of: https://jsonmock.hackerrank.com/api/iot_devices/search?status=<statusQuery>&page=<pageNumber> (replace placeholders). The API returns JSON with fields: page, per_page, total, total_pages, data (array of devices). Each device has: id, timestamp (UTC ms when added), status, operatingParams { rotorSpeed, slack, rootThreshold }, asset { id, alias }, optional parent { id, alias }. Count and return the number of matching devices.

Quick Answer: This question evaluates handling of paginated REST APIs, JSON parsing and nested-data filtering, month/year date parsing, and numeric threshold comparisons, reflecting skills in data retrieval and programmatic data manipulation.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.