on 2024 Dec 13 11:28 AM
Hi SAP community,
I have requirement where I need to retrieve payload based on message id in cpi
could any one help me on this with a detailed explanation?
Regards
Rakesh
Request clarification before answering.
Hi @Rakesh1610
The answer to your questions is complex.
Important Note: a) SAP Cloud Integration does not log the payload for the messages unless TRACE is explicitly enabled (TRACE will only last 10 min, and the data will be removed after 60 min). b) SAP Cloud Integration has a flexible pipeline: this means you can have one or many source payloads, one or many intermediate payloads, one or many enriched payloads, one or many transformed payloads, and one or many target payloads, all linked to the same message-id.
Yes. You can use APIs or UI to download the payload from a specific message-and-step.
Documentation: https://api.sap.com/api/MessageProcessingLogs/path/get_MessageProcessingLogs___MessageGuid___
Please find an example
Step 1: Use message-id
/api/v1/MessageProcessingLogs('your-message-id-here')
Step 2: Navigate to Runs to get RunId
/api/v1/MessageProcessingLogs('your-message-id')/Runs
Step 3: Navigate to RunSteps
/api/v1/MessageProcessingLogRuns('your-run-id-here')/RunSteps
Step 4: $filter or select a "child" based on your stepId or other criteria
/api/v1/MessageProcessingLogRunSteps(RunId='your-run-id-here',ChildCount=your-child-count)/TraceMessages
Step 5: Navigate to value using TraceId to extract the payload.
/api/v1/TraceMessages(your-TraceId-here)/$value
I hope this helps you. Keep integrating 🖖🏻
Best regards,
Ricardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
46 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.