diff --git a/backend/routes/ivantiFpWorkflow.js b/backend/routes/ivantiFpWorkflow.js index 6e13841..b05065d 100644 --- a/backend/routes/ivantiFpWorkflow.js +++ b/backend/routes/ivantiFpWorkflow.js @@ -75,19 +75,19 @@ 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 } + * Format: { subject, filterRequest: { filters } } */ function buildSubjectFilterRequest(findingIds) { return JSON.stringify({ - filters: [{ - field: 'id', - exclusive: false, - operator: 'IN', - value: findingIds.map(id => String(id)).join(',') - }], - projection: 'internal', - sort: [{ field: 'id', direction: 'ASC' }] + subject: 'hostFinding', + filterRequest: { + filters: [{ + field: 'id', + exclusive: false, + operator: 'IN', + value: findingIds.map(id => String(id)).join(',') + }] + } }); }