Skip to content

Conversation

atav928
Copy link

@atav928 atav928 commented Sep 8, 2025

Added GetSensorUsageHourly to _sensor_usage.py endpoint; tested it in production, and works by providing either hourly or weekly billing usage depending on how billing is calculated. This is part of CrowdStrike documentation and also shows in the billing dashboard how these values are pulled. This helps calculate the Cloud (reserved hourly) usage. The endpoint that is not documented, but works along with getting weekly billing information is: "/billing-dashboards-usage/aggregates/hourly-average/v1"

Please review our Code of Conduct
and our Contribution Guidelines before submitting a Pull Request.

REMOVE ALL PULL REQUEST HINTS BEFORE SUBMITTING

PULL REQUEST TITLE

Pull Request general description should go here.

Please fill out all values and then remove any help text before submitting your PR.
Refer to this PR as a reference example!

  • Enhancement
  • Major Feature update
  • Bug fixes
  • Breaking Change
  • Updated unit tests
  • Documentation
  • Code sample

Check the values above that match your PR and remove the remaining.

Unit test coverage

pytest tests/test_sensor_usage.py -v
============================================================ test session starts ============================================================
cachedir: .pytest_cache
rootdir: /GitHub/falconpy
configfile: pyproject.toml
plugins: cov-6.3.0
collected 1 item                                                                                                                            

tests/test_sensor_usage.py::TestSensorUsage::test_all_code_paths PASSED                                                               [100%]

============================================================= 1 passed in 1.97s =============================================================

Bandit analysis

BANDIT ANALYSIS RESULTS SHOULD BE POSTED
HERE. PLEASE REVIEW CONTRIBUTING.md FOR
MORE DETAILS ON GENERATING BANDIT RESULTS

Added features and functionality

  • If your PR adds features or functionality, what should be included in the next release notes?
    Added support for pulling hourly billing data from billing-dashboard-usage endpoint on top of the weekly-average values.

Issues resolved

  • Bug fix: Please list related bugs individually. Identifying the ticket or bug report in the PR description auto-updates the affected ticket and helps the community with ticket triage. For example:
  • BE EXPLICIT in what you are resolving

Other

  • List any other details here
  • Documentation regarding your changes can also be listed here

…oud based; added it to test sensor; tested it in production and works since the endpoint does work and provides hourly usage billing that is used for Cloud (reserved hourly) usage
@jshcodes jshcodes changed the base branch from main to dev September 11, 2025 00:12
@jshcodes jshcodes assigned jshcodes and atav928 and unassigned jshcodes Sep 11, 2025
@jshcodes jshcodes added the sensor usage Sensor usage issues and questions label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sensor usage Sensor usage issues and questions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants