B2B Gateway > B2B Gateway REST APIs > REST API to reprocess multiple file-level events
  

REST API to reprocess multiple file-level events

You can use the Reprocess Event REST API to reprocess multiple file-level events. You can't reprocess an event that was created using an intelligent structure model.
Using this API, you can generate new reprocessed events from the existing events. You can use the Event Status REST API to get the runtime status of the reprocessed event based on the reprocessed event ID.
When you use this API, the output might include a list of successful and failed events. For more information, see Error messages and error codes .

Reprocess Event REST API Request

Use the Reprocess Event REST API to reprocess an multiple file-level events and generate a new reprocessed events from the existing events. This API uses the POST method.
To reprocess one or more events, use the following URL:
https://b2bgateway.<pod>.<baseUrl>/b2b-gw/api/v1/event/reprocess
Where:
You can copy the values of pod and base Url from the B2B Gateway URL after you access it from the My Services page of Informatica Intelligent Cloud Services.
For example:
https://use6-b2bgw.dm-us.informaticacloud.com/b2b-gw/api/v1/event/reprocess
In the request body, you can use a ',' comma separator to provide a list of event IDs that need to be reprocessed. For example, [15488002, 15489001, 15489021,15489021]

Reprocess Event REST API Response

When you use the B2B Gateway Reprocess Event REST API, the API response includes a list of successful and failed events in JSON format.
The API response includes the following information:
Property
Description
eventStatus
Status of the event.
eventId
ID of the event.
eventCreationTimestamp
Time when the event occurred. System time in milliseconds as returned by Java API java.lang.System.currentTimeMillis .
messageType
Type of message that is exchanged with the partner.
partnerName
Name of the partner.
partnerNumber
Number of the partner.
partnerFileType
Type of files that are exchanged with the partner.
direction
The flow to run for the customer. The value is INBOUND for an inbound flow and OUTBOUND for an outbound flow.
reprocessedEventId
Event ID of the new event that is generated from an existing event.
errorMessage
The error message that appears when the reprocessing of an event fails.
errorCode
The error code corresponding to the event that failed during the reprocessing activity.
The following sample response shows the details of an event that was successfully reprocessed:
{
"successfulReprocessEventList" :
[
{ "eventStatus" : "Reprocessed" ,
"eventId" : 15493002 ,
"eventCreationTimestamp" : 1740039822889 ,
"messageType" : "file" ,
"partnerName" : "X12_CustomerAllMessages_export" ,
"partnerNumber" : "donotchang1" ,
"partnerFileType" : "EDIX12" ,
"direction" : "INBOUND" ,
"reprocessedEventId" : 15494001
}
],
"failedReprocessEventList" : []
}
The following sample response shows the details of an event that failed to get reprocessed:
{
"successfulReprocessEventList": [],
"failedReprocessEventList": [
{
"eventStatus": "Complete",
"eventId": 22896717,
"eventCreationTimestamp": 1740562638016,
"messageType": "file",
"partnerName": "x12-25-02-26-OXM",
"partnerNumber": "WTM8IHMWJLDN",
"partnerFileType": "EDIX12",
"direction": "OUTBOUND",
"errorMessage": "You cannot run flow for this partner. Verify the partner settings.",
"errorCode": "RE1005"
}
]
}

Error messages and error codes

The Reprocessing Event REST API returns a failed reprocessed events list with the corresponding error messages based on various scenarios.
The events fail to reprocess with the corresponding error messages as shown in the following table:
Failure Scenarios
Error Message
The event is not of file-level event type.
You can only reprocess file-level events.
The event status is already reprocessed.
You can not reprocess read-only events.
The event is discarded.
You can not reprocess read only events.
The event file type is Structured.
You can not reprocess STRUCTURED file type.
The event ID is Null or doesn't exist.
The Event Id does not exist.
The event list is empty or missing
Event ID list is missing in the request body. Please provide a list of Event IDs.
Passing an invalid event ID of the partner
You cannot run flow for this partner. Verify the partner settings.
When the reprocessing of an event fails, the API returns one of the following error codes:
Error Code
Error Message
RE1001
You can only reprocess file-level events.
RE1002
You cannot reprocess read-only events.
RE1003
The partner does not exist for this event.
RE1004
You cannot reprocess STRUCTURED file type.
RE1005
You cannot run flow for this partner. Verify the partner settings.
RE1006
Event ID list is missing in the request body. Please provide a list of Event IDs.
RE1007
Reprocess operation is not supported for received event.
RE1008
The Event Id does not exist.