Cloud Integration Hub > Cloud Integration Hub REST APIs > Event Status REST API
  

Event Status REST API

When you use a Cloud Integration Hub Run Publication Subscription API to start the running of a publication or of a subscription and the action succeeds, Cloud Integration Hub returns the event ID of the publication or the subscription event that it generates.
When you run the REST API, Cloud Integration Hub returns the event ID in the REST API response.
You can use the Cloud Integration Hub Event Status REST API to query the status of the publication or subscription event according to the event ID. You can see whether the publication or subscription process is still running, and after the process is complete, you can see whether it completed successfully. If the process fails, the response to the query includes the cause of the failure.
Note: For a list of event statuses, see Event statuses.
To query the status of an event, use a GET command with the following REST URL:
https://<pod>.<baseUrl>/dih-console/api/v1/event/<eventId>
Where:
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/api/v1/event/2435
Tip: You can copy the values of <pod> and <baseUrl> from the Cloud Integration Hub URL after you access it from the My Services page of Informatica Intelligent Cloud Services.

Event Status API Response

When you use the Cloud Integration Hub Event Status API to query the status of a publication or a subscription event, the API returns the event response in an EventResponse.java model class.
The following table describes the response properties:
Property
Description
responseCode
Response of the Run Publication Subscription API action.
eventId
ID of the event that Cloud Integration Hub generates for the publication or for the subscription.
eventType
Type of the event that Cloud Integration Hub generates for the publication or for the subscription.
topicName
Name of the topic that is associated with the publication or with the subscription.
publicationName or subscriptionName
Name of the publication or of the subscription.
applicationName
Name of the publishing or of the subscribing application.
eventStatus
Status of the event that Cloud Integration Hub generates for the publication or for the subscription.
eventStartTimeLong
Time when the publication or the subscription event started. System time in milliseconds as returned by Java API java.lang.System.currentTimeMillis.
eventEndTimeLong
Time when the publication or the subscription event ended. System time in milliseconds as returned by Java API java.lang.System.currentTimeMillis.
referencedEventsList
Applicable for file publication events, aggregated subscription events, and compound subscription events. List of event IDs that are related to the file publication, the aggregated subscription, or the compound subscription event.
For example, the referencedEventsList of a file publication event includes the file events of the files that are published as part of the publication event.
isFinal
Is the event in a final state.
isError
Is the event in Error status.
sourceSuccessRows
Number of source rows that Cloud Integration Hub read successfully.
sourceFailedRows
Number of source rows that Cloud Integration Hub failed to read.
targetFailedRows
Number of target rows that Cloud Integration Hub failed to write.
targetSuccessRows
Number of target rows that Cloud Integration Hub wrote successfully.
detailedMessage
Applicable for events in an Error status. If the error is caused by Cloud Integration Hub, detailedMessage returns the error message from the Cloud Integration Hub event. For any other error, for example an authentication failure or an incorrect REST URL request, detailedMessage includes a message that describes the cause of the error.

Sample Event Status API Responses

Response to a request to query the status of publication event 4003:
{
"responseCode": "SUCCESS",
"eventId": 4003,
"eventType": "Publication",
"topicName": "top_120",
"publicationName": "ng_pub_120_1",
"applicationName": "app1",
"eventStatus": "Complete",
"eventStartTimeLong": 1431078308560,
"eventEndTimeLong": 1431078313780,
"isFinal": true,
"isError": false,
"sourceSuccessRows": 10,
"sourceFailedRows": 0,
"targetFailedRows": 0,
"targetSuccessRows: 10}
Response to a request to query the status of aggregated subscription event 3009, which includes subscription events 3008 and 3007:
{
"responseCode": "SUCCESS",
"eventId": 3009,
"eventType": "Aggregated Subscription",
"topicName": "topic1",
"subscriptionName": "sub1",
"applicationName": "app1",
"eventStatus": "Complete",
"eventStartTimeLong": 1431065700088,
"eventEndTimeLong": 1431065704372,
"referencedEventsList": "3008,3007"
"isFinal": true,
"isError": false,
"sourceSuccessRows": 15,
"sourceFailedRows": 0,
"targetFailedRows": 0,
"targetSuccessRows: 15
}
Response to a request to query the status of publication event 3016, where the publication process failed:
Response:

{
"responseCode": "SUCCESS",
"eventId": 3016,
"eventType": "Publication",
"topicName": "top_120",
"publicationName": "ng_pub_120_1",
"applicationName": "app1",
"eventStatus": "Error",
"eventStartTimeLong": 1431066353202,
"eventEndTimeLong": 1431066357162,
"isFinal": true,
"isError": true,
"sourceSuccessRows": 2,
"sourceFailedRows": 1,
"targetFailedRows": 1,
"targetSuccessRows: 2
"detailedMessage": "Error while copying several rows :\nSrcFailedRows: 1\nTgtFailedRows: 1\nSrcSuccessRows: 2\nTgtSuccessRows: 2\nPowerCenter workflow: s__DIH_pub_ng_pub_120_1\nPowerCenter session: s__DIH_pub_ng_pub_120_1\n\nCheck the PowerCenter session log for more information."
}