refactor API requests to include organizationId in request body; improve batch processing for log identifiers #116
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.
This pull request updates several backend API endpoints and their corresponding frontend calls to consistently accept the
organizationIdparameter in the request body (preferred) instead of the query string, improving API design and forward compatibility. Additionally, it introduces batching for identifier lookups to respect API limits and ensures POST requests include an empty body where required.API Request Parameter Handling:
detection-packs/routes.tsandnotification-channels/routes.tsto acceptorganizationIdfrom the request body (preferred) or query string (legacy), with improved error messaging. [1] [2]DetectionPacksAPI.disablePack,notificationChannelsAPI.test) to sendorganizationIdin the POST request body instead of as a query parameter. [1] [2]Batching and Performance Improvements:
CorrelationAPI.getIdentifiersForLogIdsmethod to batch requests in groups of 100 log IDs and merge results, improving scalability and respecting API limits.Request Consistency:
AdminAuthAPI.testConnection,InvitationsAPI.resendInvitation, andOrganizationsAPI.leaveOrganizationinclude an empty body for consistency and future-proofing. [1] [2] [3]