-
Notifications
You must be signed in to change notification settings - Fork 31
Introduce centralised request helpers for Chronicle APIs #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mihirvala08
merged 43 commits into
google:main
from
PaperMtn:feature/request-helper-implementation
Jan 12, 2026
Merged
Introduce centralised request helpers for Chronicle APIs #167
mihirvala08
merged 43 commits into
google:main
from
PaperMtn:feature/request-helper-implementation
Jan 12, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ction parameters.
… pagination metadata. chore: updated integration tests for new list handling.
Collaborator
|
@PaperMtn can you commit a minor change from your end (maybe update project version to I'm not able to run integration tests on GitHub action as runner is not considering my commits as PR commits. |
Collaborator
|
/run-integration-tests fa5a425 |
Collaborator
mihirvala08
approved these changes
Jan 12, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
This PR introduces a centralised request helper for SecOps API calls and establishes a consistent, reusable pattern for:
The goal is to reduce duplicated request logic across modules, make behaviour predictable for users, and provide a single place to maintain request-related functionality going forward.
Why
Individual modules previously implemented their own request logic using
client.session.get/post, leading to:This PR creates a single, well-tested abstraction that all modules can build on.
What’s included
New request helpers
secops.chronicle.utils.request_utils.chronicle_request()legacy:and:rpcMethodendpoints)APIError) for callerssecops.chronicle.utils.request_utils.chronicle_paginated_request()as_list=Trueflag to return flat lists when desiredTest coverage
as_listsemanticsBehavioural notes
as_list=Trueis opt-in and returns a Python list instead of a dict forlist_...functions.Scope of this PR
This PR focuses on introducing and validating the request helpers, and implementing them on some modules.
In order to test the implementation, a number of modules have been migrated to using the helper functions:
secops.chronicle.rule_set.pysecops.chronicle.watchlist.pysecops.chronicle.validate.pysecops.chronicle.udm_search.pysecops.chronicle.udm_mapping.pyTests for these modules have been included, and moved into their own modules where they were previously in
test.chronicle.test_client.pyThe plan is for future migrations to use the helpers being done incrementally in follow-up PRs per-module, to keep changes small and reviewable.
Testing
Follow-up work