From 5d417edf82cf503168088dde21c3048092b493bc Mon Sep 17 00:00:00 2001 From: jramos Date: Wed, 8 Apr 2026 12:08:08 -0600 Subject: [PATCH] fix: align subjectFilterRequest with Ivanti search filter schema Remove extra fields (orWithPrevious, implicitFilters, subject) that aren't in the Swagger filter schema. Add projection and sort fields to match the search endpoint format. --- backend/routes/ivantiFpWorkflow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/routes/ivantiFpWorkflow.js b/backend/routes/ivantiFpWorkflow.js index fac0fd6..6e13841 100644 --- a/backend/routes/ivantiFpWorkflow.js +++ b/backend/routes/ivantiFpWorkflow.js @@ -76,6 +76,7 @@ function validateFpWorkflowForm(body) { /** * Builds the subjectFilterRequest JSON for the Ivanti FP workflow endpoint. * This is a stringified filter that tells Ivanti which host findings to include. + * Format matches the search endpoint filter schema: { filters, projection, sort } */ function buildSubjectFilterRequest(findingIds) { return JSON.stringify({ @@ -83,11 +84,10 @@ function buildSubjectFilterRequest(findingIds) { field: 'id', exclusive: false, operator: 'IN', - orWithPrevious: false, - implicitFilters: [], value: findingIds.map(id => String(id)).join(',') }], - subject: 'hostFinding' + projection: 'internal', + sort: [{ field: 'id', direction: 'ASC' }] }); }