From ee9403ab47d74ff4151d375c3b9b50e1484c61ba Mon Sep 17 00:00:00 2001 From: jramos Date: Wed, 8 Apr 2026 10:08:14 -0600 Subject: [PATCH] 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 --- backend/routes/ivantiFpWorkflow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/routes/ivantiFpWorkflow.js b/backend/routes/ivantiFpWorkflow.js index 0cc4081..984a03a 100644 --- a/backend/routes/ivantiFpWorkflow.js +++ b/backend/routes/ivantiFpWorkflow.js @@ -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 });