Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

JSON payload modify- parameter all values to be in one-liner

We get the part of JSON looks like below as one parameter contains different lines ,which causes issue at Apigee side to forward the same to target endpoint

{"error_message":"Received non success response code","error_details":{"path":"\/api\/v1\/name","error":"Bad Request","message":"","timestamp":"2024-01-29T12:01:27.048+00:00","status":400},"error_code":"org.mozilla.javascript.Undefined@

"passedSummary" : "(alertID: 1234567 ) ***********************FootPrintSummary_Start***********************

WorkflowStartTimestamp : 19/01/2024 18:02:19

WorkflowEndTimestamp : 19/01/2024 18:03:05

WorkflowExecutionTime : 00:0:46

WorkFlowPattern: DB_ERROR

WorkflowOutcome : Escalated

WorkflowOutcomeReason : Escalated

Object : abcd12345_iq

Object Class : NA

HostName : 1234abcd.net

ServiceStream : sampleservice

AutomationType : Runbook

***********************FootPrintSummary_End***********************

Thanks and Regards,

Team

(Do not reply - This is an auto-generated mail)Escalated to team" ,

"passedResultsURL" : "Escalated || SUPPORT

"

so, is there a way to keep all different lines to one line for the parameter value like below, 

"passedSummary" : "(alertID: 1234567 ) ***********************FootPrintSummary_Start***********************WorkflowStartTimestamp : 19/01/2024 18:02:19WorkflowEndTimestamp : 19/01/2024 18:03:05WorkflowExecutionTime : 00:0:46WorkFlowPattern: DB_ERRORWorkflowOutcome : EscalatedWorkflowOutcomeReason : EscalatedObject : abcd12345_iqObject Class : NAHostName : 1234abcd.netServiceStream : sampleserviceAutomationType : Runbook***********************FootPrintSummary_End***********************Thanks and Regards,Team(Do not reply - This is an auto-generated mail)Escalated to team" ,"passedResultsURL" : "Escalated || SUPPORT"

 

5 REPLIES 5