fix: correct subjectFilterRequest format for Ivanti FP workflow API
The API expects { subject: 'hostFinding', filterRequest: { filters } }
not a flat filter object. Confirmed working via direct curl test —
workflow ID 33418832 created successfully.
This commit is contained in:
@@ -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(',')
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user