Skip to content

Add QueryJobs pagination sample for NG-SIEM#1459

Merged
jshcodes merged 2 commits into
CrowdStrike:samplesfrom
davewebb-crwd:add-queryjobs-pagination-sample
May 11, 2026
Merged

Add QueryJobs pagination sample for NG-SIEM#1459
jshcodes merged 2 commits into
CrowdStrike:samplesfrom
davewebb-crwd:add-queryjobs-pagination-sample

Conversation

@davewebb-crwd
Copy link
Copy Markdown

Summary

  • Adds samples/ngsiem/queryjobs-pagination/ with a Python script that demonstrates cursor-based pagination for NG-SIEM QueryJobs
  • The QueryJobs API returns a 200-event result buffer for filter queries; this script uses the around parameter to walk through all matching events beyond the initial buffer
  • Includes a README following the existing sample documentation conventions
  • Updates the parent samples/ngsiem/README.md with a link to the new sample

Files Added

  • samples/ngsiem/queryjobs-pagination/README.md — usage docs, parameter reference, pagination algorithm explanation
  • samples/ngsiem/queryjobs-pagination/ngsiem_queryjob_paginator.py — FalconPy-based paginator script

Test plan

  • Verify script runs with valid API credentials: python3 ngsiem_queryjob_paginator.py -q '#event_simpleName=ProcessRollup2'
  • Verify --max-events flag limits output correctly
  • Verify MSSP mode works with -m CHILD_CID
  • Confirm README renders correctly on GitHub

Adds a sample script that demonstrates cursor-based pagination for
NG-SIEM QueryJobs, which return a 200-event result buffer for filter
queries. The script uses the `around` parameter to walk through all
matching events beyond the initial buffer.
@davewebb-crwd davewebb-crwd changed the base branch from main to samples May 11, 2026 20:51
Move script to samples/ngsiem/ (no subfolder for single-file samples),
merge README content into the parent ngsiem README, and add ASCII
artwork to the script docstring.
Copy link
Copy Markdown
Member

@jshcodes jshcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! 🙇

@jshcodes jshcodes merged commit aa5a8f1 into CrowdStrike:samples May 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants