Cloud Integration Hub > Cloud Integration Hub REST APIs > Events REST API
  

Events REST API

Use the Cloud Integration Hub Events REST API to get the details of an event based on the search criteria. The API returns event details and the child events.

Events REST API Request

To get the details of an event, use the following REST API URL:
https://<pod>.<baseUrl>/dih-console/api/v1/events
Where:
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/
To get the details of an event, use the following request syntax:
Request headers
Include the following headers in the Events REST API request:
Content-Type: application/json
Accept: application/json
Request body
Include the following in the Events REST API request:
{
"applicationName": "String",
"topicName": "String",
"pubSubName": "String",
"timeframe": Custom - For more details, refer to the following table,
"firstResult": int,
"maxResults": int,
"useExactMatch": boolean,
"eventType": "String",
"eventStatus": "String"
}
The request to get details of an event can include the following optional properties:
Property
Description
applicationName
Name of the publishing or subscribing application.
topicName
Name of the topic that is associated with the publication or subscription.
pubSubName
Name of the publication or subscription.
timeframe
You can either enter the UTC Timezone format (yyyy-MM-ddTHH:mm:ss.SSSZ) or select the range from the list of enum values.
{
"range": enum values
}
You can select the range from the following enum values:
  • - NO_RANGE
  • - LAST_HOUR
  • - LAST_TWO_HOURS
  • - LAST_24_HOURS
  • - LAST_7_DAYS
  • - LAST_30_DAYS
  • - TODAY
  • - YESTERDAY
  • - CUSTOM
Default range is LAST_24_HOURS.
You must mention the fromDate and toDate in the request body if the timeframe range is set to CUSTOM.
{
"fromDate": "Date",
"toDate": "Date",
"range": "CUSTOM"
}
The fromDate and toDate must be in UTC Timezone format (yyyy-MM-ddTHH:mm:ss.SSSZ).
firstResult
The number of rows to skip. For example, you might want to skip the first three rows. Default is zero.
maxResults
Enter the maximum number of results to display. Default is 2000.
useExactMatch
Exact match of the search expression when performing the search. Applies to pubSubName, topicName, and applicationName properties.
You can enter one of the following values:
  • - true
  • - false
Default is false.
eventType
The type of the event that Cloud Integration Hub generates for the publication or for the subscription. Select the value from the following enum values:
  • - ALL
  • - PUBLICATION
  • - SUBSCRIPTION
  • - COMPOUND_SUBSCRIPTION
  • - COMPOUND_PUBLICATION
  • - UNBOUND_SUBSCRIPTION
  • - AGGREGATED_SUBSCRIPTION
Default is ALL.
eventStatus
The status of the event that Cloud Integration Hub generates for the publication or for the subscription. Enter one of the following enum values:
  • - ALL
  • - COMPLETE
  • - DELAYED
  • - DISCARDED
  • - ERROR
  • - PROCESSING
  • - REPROCESSED
Default is ALL.
For example:

Basic Auth
{
Username: Administrator@MyCompany.com
Password: MyPassword
}
Accept - application/json
Content-Type - application/json
{
"eventStatus": "COMPLETE",
"eventType": "PUBLICATION",
"applicationName":"API_App",
"topicName" :"APIT",
"pubSubName" :"APIPUB",
"timeframe": {
"range": "NO_RANGE"

},
"eventType": "ALL",
"useExactMatch" : true
}
The rate limit policy controls the number of times API consumers can invoke the API during a designated time period. This API has a rate limit policy of 5 invocations per minute. Cloud Integration Hub rejects attempts to access the API after it reaches the 5 invocations per minute limit.

Events REST API Response

When you use the Cloud Integration Hub Events API to get the details of a publication or a subscription event, the API returns the following event response:
The following is the response syntax to a request to query the details of an event:
Response header
The Events REST API response includes the following header:
Retry-After - <time in seconds>
Retry-After is the time in seconds to wait before making the follow-up request. Retry-After appears if the response code is TOO_MANY_REQUESTS.
Response body
The Events REST API response includes the following body:
{
"eventId": "Long",
"eventType": "String",
"applicationName": "String",
"topicName": "String",
"pubSubName": "String",
"createTime": "Event StartTime :: Date",
"completionTime": "Event Completed Time :: Date",
"parentEventId": "Long",
"descendantState": "enum mentioned in the request body.",
"childEvents": "List<EventDetailResponse>",
"runID": "String",
"eventHistory": {
"eventId": "Long",
"timeStamp": "Date",
"eventStatusName": "String",
"comments": "String"
}
}
The following table describes the elements of the response:
Property
Description
eventId
ID of the event that Cloud Integration Hub generates for the publication or subscription.
eventType
The type of event that Cloud Integration Hub generates for the publication or subscription.
applicationName
Name of the application that is associated with the publication or subscription.
topicName
Name of the topic that is associated with the publication or subscription.
pubSubName
Name of the publication or subscription.
createTime
The time when Cloud Integration Hub created the publication or subscription event.
completionTime
The time when the publication or subscription event ended.
eventStatus
The status of the publication or subscription event.
parentEventId
Creates a child event based on a profile ID and returns the event ID of the child event.
descendantState
The cumulative status of all the child events.
childEvents
The events available within the parent event.
Applies to publication events.
eventHistory
The details of the complete event process. The following syntax appears in the eventHistory response:
{
"eventId": "Long",
"timeStamp": "Date",
"eventStatusName": "String",
"comments": "String"
}
sourceSuccessCount
The number of source rows or files that Cloud Integration Hub read successfully.
sourceFailedCount
The number of source rows or files that Cloud Integration Hub failed to read.
targetSuccessCount
The number of target rows or files that Cloud Integration Hub wrote successfully.
targetFailedCount
The number of target rows or files that Cloud Integration Hub failed to write.
runId
Run ID of the associated Data Integration or Mass Ingestion Files task.
Response codes
When you use the Cloud Integration Hub Events API to get the details of an existing event, Cloud Integration Hub returns the response code of the action that you perform in the API response.
The API can return the following response codes:
Code
Description
200
SUCCESS. The request succeeded.
429
TOO_MANY_REQUESTS. The number of failed requests exceeded the allowed limit for your organization.
For example:
{
"eventId": 32010,
"createTime": "2023-04-20T02:45:58.094Z",
"completionTime": "2023-04-20T02:46:40.130Z",
"eventType": "PUBLICATION",
"eventStatus": "Complete",
"descendantState": "ERROR",
"applicationName": "DI_App",
"pubSubName": "DSS_Pub",
"topicName": "DI_Topic",
"sourceSuccessCount": 1,
"sourceFailedCount": 0,
"targetSuccessCount": 1,
"targetFailedCount": 0,
"runId": "28",
"childEvents": [
{
"eventId": 32011,
"createTime": "2023-04-20T02:46:40.157Z",
"completionTime": "2023-04-20T02:47:04.801Z",
"parentEventId": 32010,
"eventType": "SUBSCRIPTION",
"eventStatus": "Error",
"descendantState": "NONE",
"applicationName": "DI_App",
"pubSubName": "DSS_Sub",
"topicName": "DI_Topic",
"sourceSuccessCount": 0,
"sourceFailedCount": 0,
"targetSuccessCount": 0,
"targetFailedCount": 0,
"runId": "9",
"eventHistory": [
{
"eventId": 32011,
"timeStamp": "2023-04-20T02:46:40.158Z",
"eventStatusName": "Processing",
"comments": ""
},
{
"eventId": 32011,
"timeStamp": "2023-04-20T02:47:04.801Z",
"eventStatusName": "Error",
"comments": "Subscription to topic failed. The job failed."
}
]
}
],
"eventHistory": [
{
"eventId": 32010,
"timeStamp": "2023-04-20T02:45:58.095Z",
"eventStatusName": "Processing",
"comments": ""
},
{
"eventId": 32010,
"timeStamp": "2023-04-20T02:46:40.130Z",
"eventStatusName": "Complete",
"comments": "Publishing to topic completed successfully"
}
]
}