Callback API to Update Status of Integration Instance from Oracle Integration

PUT https://<hostname>/ws/rest/service/v2/oic/job

Purpose

Updates the status of the OIC instance based on the Job Id.

Integrations from Oracle Integration call this API to update the status of the integration. When Unifier invokes the integration, the job ID is sent as an input in the payload. The same job ID is used by the integration to send the status back to Unifier.

This API can be invoked or plugged-in at several places in the integration, such as, at the start of the integration to indicate the status Started, at fault to indicate the status Failed, or at the end of the integration to indicate the status Completed.

The integration should have the invocation to this job service in the fault flow as well to mark the status as Failed and the corresponding fault message/error message in the message attribute of payload.

Prerequisites

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Request

This is an example of a payload request.

{

"jobId":"3A0429936DD166A",

"status": "Started",

"message": "Process Started"

}

Sample Success Response

This is an example of a response to the payload request.

{

status : 200,

message : ["Job updated Successfully" ],

rest_audit_id : 1234

}

Sample Failed Response

This is an example of a response to the payload request.

{

"data": [],

"message": ["Status should be one of [Started, Completed, Failed]"],

"status": 1804,

"rest_audit_id": 547

}

Supported Validation Messages and Status Codes

The following error messages and status codes display in the response when incorrect values are provided in the request.

Use-case Scenario Status Code Error Message
Status is missing in input payload 1802 Status is missing.
JobId does not exists in Unifier. 1803 JobId not found.
JobId is missing or empty in payload 1801 JobId is invalid or missing.
Status not in one of the predefined list <'Started', 'Completed', 'Failed'>. 1804 Status should be one of [Started, Completed, Failed]
Positive flow - All validations thru. 200 Job updated Successfully
Unexpected error 500 Unexpected Error in updating Job Status. ErrorCode : <diagnostic code>