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' }] }); }