fix: correct Ivanti API endpoint paths for FP workflow creation and attachment

- Creation: /workflowBatch -> /workflowBatch/falsePositive/request
- Attachment: /workflowBatch/{id}/attachment -> /workflowBatch/falsePositive/{uuid}/attach
- Paths confirmed against platform4.risksense.com swagger spec
This commit is contained in:
jramos
2026-04-08 10:08:14 -06:00
parent 3d04cd393f
commit ee9403ab47

View File

@@ -243,7 +243,7 @@ function createIvantiFpWorkflowRouter(db, requireAuth) {
// 1. Build payload and call Ivanti API to create workflow batch
const payload = buildIvantiPayload(req.body, findingIds);
const createUrl = `/client/${encodeURIComponent(clientId)}/workflowBatch`;
const createUrl = `/client/${encodeURIComponent(clientId)}/workflowBatch/falsePositive/request`;
let createResult;
try {
@@ -301,7 +301,7 @@ function createIvantiFpWorkflowRouter(db, requireAuth) {
const attachmentResults = [];
for (const file of files) {
try {
const attachUrl = `/client/${encodeURIComponent(clientId)}/workflowBatch/${encodeURIComponent(workflowBatchId)}/attachment`;
const attachUrl = `/client/${encodeURIComponent(clientId)}/workflowBatch/falsePositive/${encodeURIComponent(workflowBatchId)}/attach`;
const attachResult = await ivantiMultipartPost(attachUrl, file.buffer, file.originalname, apiKey, skipTls);
if (attachResult.status === 200 || attachResult.status === 201) {
attachmentResults.push({ filename: file.originalname, success: true });