Table Of Contents
EventApp Service
Information About EventApp Service
createUserAction
deleteEventsBeforeATimeStamp
deleteEventsBetweenTimestamps
getEventCountAfterATimestamp
getEventsAfterATimestamp
getEventsBeforeATimestamp
getEventsBetweenEventIds
getEventsBetweenTimestamps
getEventsBetweenTimestampsByEventClass
getEventsBetweenTimestampsByEventClass
getEventsBetweenTimestampsWithPerceivedSeverity
getEventsForEventType
getEventsForEventTypeByEventClass
getEventsForFeature
getEventsForFeatureByEventClass
getEventsForPerceivedSeverity
getEventsForPerceivedSeverityByEventClass
getLastEvent
getUserActions
modifyEventStatus
EventApp Service
This chapter describes the DCNM web services' API methods for the EventApp service.
Information About EventApp Service
The EventApp service provides you with various methods to obtain persistent events in the database.
createUserAction
Persist the userActions done for a list of events
Parameters
opContext—Operational context
annotatedEvents—List of userActions performed on a list of events
Return Value
void
deleteEventsBeforeATimeStamp
Deletes the events having a timestamp earlier than the specified Timestamp object.
Parameters
opContext—Operational context
timestamp—specifies the Timestamp
Return Value
void
deleteEventsBetweenTimestamps
Deletes the events having a timestamp between two timeInstances (startTime and endTime)
Parameters
opContext—Operational context
startTime—Start Timestamp
endTime—End Timestamp
Return Value
void
getEventCountAfterATimestamp
Returns the number of events having a timestamp later than the specified Timestamp object.
If no Events present in the Database later than specified timestamp will return 0.
Parameters
opContext—Operational context
timestamp—specifies the Timestamp
Return Value
The number of events having a timestamp later than the specified timestamp
getEventsAfterATimestamp
Returns a list of Events having a timestamp later than the specified Timestamp object.
If no Events present in the Database later than specified timestamp will return an empty List.
Parameters
opContext—Operational context
timestamp—specifies the Timestamp
eventCount—specifies the no.of events to be retrieved from the Database
Return Value
List of the Events having a timestamp later than the specified timestamp
getEventsBeforeATimestamp
Returns a list of Events having a timestamp earlier than the specified Timestamp object.
If no Events present in the Database earlier to the specified timestamp, will return an empty List.
Parameters
opContext—Operational context
timestamp—specifies the Timestamp
eventCount—specifies the no.of events to be retrieved from the Database
Return Value
List of the Events having a timestamp earlier than the specified timestamp
getEventsBetweenEventIds
Returns a list of Events having eventId between then given two eventIds. If the startId is grater then then endId then IllegalArgumentException will be thrown.This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.0(3) or later.
Parameters
opContext—OpContext
startId
endId
Returns
List of the Events having eventId between the given start and endId.
If the specified startId is null, then will return events having eventId lesser than the endId.
If the specified endId is null, then will return events having eventId grater than the startID
If the specified startId and endId are null, then will return all the persisted events.
getEventsBetweenTimestamps
Returns a list of Events having a timestamp between two timeInstances (startTime and endTime)
Parameters
opContext—Operational context
startTime—Start Timestamp
endTime—End Timestamp
Return Value
List of the Events having a timestamp between two timeInstances (startTime and endTime)
If the specified startTime is null, then will return events having a timestamp earlier than the endTime.
If the specified endTime is null, then will return events having a timestamp later than the startTime
If the specified startTime and endTime are null, then will return all the persisted events.
getEventsBetweenTimestampsByEventClass
Returns the List of Events having timeStamp between two timeInstances (startTime and endTime) with the specified filterType.
Parameters
opContext—Operational context
startTime—Start Timestamp
endTime—End Timestamp
filterType—specifies the type of Events to be retrieved from the Database.
Can specify the following filterTypes (Constants)
–
DcmNormalizedEvent
–
DcmThresholdEvent
–
DcmInformationalEvent
–
UnsupportedEvent
–
All type of Events
Return Value
List of the Events having a timestamp between two timeInstances (startTime and endTime) and corresponding filterType
If the specified startTime is null, then will return events having a timestamp earlier than the endTime.
If the specified endTime is null, then will return events having a timestamp later than the startTime
If the specified startTime and endTime are null, then will return all the events persisted in the Database.
getEventsBetweenTimestampsByEventClass
Returns the List of Events having timeStamp between two timeInstances (startTime and endTime) with the specified filterType. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 4.0 or later.
Parameters
opContext—OpContext
startTime—Start Timestamp
endTime—End Timestamp
filterType—specifies the type of Events to be retrieved from the Database.
You can specify the following filterTypes (Constants)
•
DcmNormalizedEvent
•
DcmThresholdEvent
•
DcmInformationalEvent
•
UnsupportedEvent
•
All type of Events
Returns
List of the Events having a timestamp between two timeInstances (startTime and endTime) and corresponding filterType
If the specified startTime is null, then will return events having a timestamp earlier than the endTime.
If the specified endTime is null, then will return events having a timestamp later than the startTime
If the specified startTime and endTime are null, then will return all the events persisted in the Database.
getEventsBetweenTimestampsWithPerceivedSeverity
Returns the List of Events having timeStamp between two timeInstances (startTime and endTime) with the specified perceivedSeverity. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 4.0 or later.
Parameters
opContext—OpContext
startTime—Start Timestamp
endTime—End Timestamp
perceivedSeverity—specifies the PerceivedSeverity
Returns
List of the Events having a timestamp between two timeInstances (startTime and endTime) with the specified perceivedSeverity.
If the specified startTime is null, then will return events having a timestamp earlier than the endTime.
If the specified endTime is null, then will return events having a timestamp later than the startTime
If the specified startTime and endTime are null, then will return all the events persisted in the Database.
getEventsForEventType
Returns the List of Events having specified EventType
Parameters
opContext—Operational context
eventType—specifies the EventType
Return Value
List returns a List of Events corresponding specified eventType and filterType
getEventsForEventTypeByEventClass
Returns the List of Events having specified EventType and filterType.
Parameters
opContext—Operational context
eventType—specifies the EventType
filterType—specifies the type of Events to be retrieved from the Database.
Can specify the following filterTypes (Constants)
–
DcmNormalizedEvent
–
DcmThresholdEvent
–
DcmInformationalEvent
–
UnsupportedEvent
–
All type of Events
Return Value
List returns a List of Events corresponding specified eventType and filterType
getEventsForFeature
Returns the List of Events having specified FeatureType.
Parameters
opContext—Operational context
featureType—specifies the FeatureType
Return Value
List of persisted Events having specified featureType
getEventsForFeatureByEventClass
Returns the List of Events having specified FeatureType and filterType.
Parameters
opContext—Operational context
featureType—specifies the FeatureType
filterType—specifies the type of Events to be retrieved from the Database.
Can specify the following filterTypes (Constants)
–
DcmNormalizedEvent
–
DcmThresholdEvent
–
DcmInformationalEvent
–
UnsupportedEvent
–
All type of Events
Return Value
List of persisted Events having specified featureType and filterType
getEventsForPerceivedSeverity
Returns the List of Events having specified PerceivedSeverity.
Parameters
opContext—Operational context
perceivedSeverity—specifies the PerceivedSeverity
Return Value
List of persisted Events having specified perceivedSeverity
getEventsForPerceivedSeverityByEventClass
Returns the List of Events having specified PerceivedSeverity and filterType.
Parameters
opContext—Operational context
perceivedSeverity—specifies the PerceivedSeverity
filterType—specifies the type of Events to be retrieved from the Database.
Can specify the following filterTypes (Constants)
–
DcmNormalizedEvent
–
DcmThresholdEvent
–
DcmInformationalEvent
–
UnsupportedEvent
–
All type of Events
Return Value
List of persisted Events having specified PerceivedSeverity and filterType
getLastEvent
Returns the Last persisted event in the Database
Parameters
opContext—Operational context
Return Value
Last persisted event in the Database
getUserActions
Returns a List of AnnotatedEvents having specified eventId.
Parameters
opContext—Operational context
eventId—persistedEventId
Return Value
Returns a List of AnnotatedEvents having eventId
modifyEventStatus
Update the EventStatus in the Database for a List of events
Parameters
opContext—Operational context
eventIds—contains list of eventIds
eventStatusList—contains a list of modified EventStatus
Return Value
void