Fault Module
The Fault module is used to configure event forwarding, acknowledge or unacknowledge events, and display a list of filtered events.
Version History
This API call was introduced in SANnav Management Portal 1.1.0
Examples
Acknowledging an Event
The following example uses a POST request to acknowledge an event.
Request Headers
Authorization = Session ID (authorization key from the login API request response)
Accept = application/json
Content-Type = application/json
URI Structure
POST https://<host>/external-api/v1/fault/events/acknowledge
Request URI
POST https://10.10.10.10/external-api/v1/fault/events/acknowledge
Request Body

{
"eventIdentifiers": [
"c0f695a7-066d-4c55-b695-a7066dec5554"
],
"eventNotes": "No action is required"
}
Request Response
When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.

{
"code": 200,
"message": "Event details updated successfully.“
}
Unacknowledging an Event
The following example uses a POST request to unacknowledge an event.
Request Headers
Authorization = Session ID (authorization key from the login API request response)
Accept = application/json
Content-Type = application/json
URI Structure
POST https://<host>/external-api/v1/fault/events/unacknowledge
Request URI
POST https://10.10.10.10/external-api/v1/fault/events/unacknowledge
Request Body

{
"eventIdentifiers": [
"c0f695a7-066d-4c55-b695-a7066dec5554"
],
"eventNotes": "Need to update the Administrator and take appropriate action."
}
Request Response
When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.

{
"code": 200,
"message": "Event details updated successfully.“
}
Subscribing to SAN Events
The following example uses a POST request to create a SANnav Management Portal event recipient.
Request Headers
Authorization = Session ID (authorization key from the login API request response)
Accept = application/json
Content-Type = application/json
URI Structure
POST https://<host>/external-api/v1/fault/events/forwarding/subscribe
Request URI
POST https://10.10.10.10/external-api/v1/fault/events/forwarding/subscribe
Request Body

{
"forwardApplicationEvents": true,
"forwardCorrelatedEvents": true,
"includeSourceAddress": true,
"port": 162,
"products": [],
"recipientAddress": "10.155.41.52",
"recipientType": "SNMP",
"severityLevel": "Info",
"trapOid": []
}
Request Response
When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.

{
"code": 200,
"message": "Forwarding Target added Successfully"
}
Unsubscribing to SAN Events
The following example uses a POST request to unsubscribe a SANnav Management Portal event recipient.
Request Headers
Authorization = Session ID (authorization key from the login API request response)
Accept = application/json
Content-Type = application/json
URI Structure
POST https://<host>/external-api/v1/fault/events/forwarding/unsubscribe
Request URI
POST https://10.10.10.10/external-api/v1/fault/events/forwarding/unsubscribe
Request Body

{
"port": 162,
"recipientAddress": "10.155.41.52",
"recipientType": "SNMP"
}
Request Response
When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.

{
"code": 200,
"message": "Deleted the Target Successfully"
}
Retrieving a Filtered List of Events
The following example uses a POST request to retrieve a list of events based on filter criteria.
Request Headers
Authorization = Session ID (authorization key from the login API request response)
Accept = application/json
Content-Type = application/json
URI Structure
POST https://<host>/external-api/v1/fault/events/
Request URI
POST https://10.10.10.10/external-api/v1/fault/events/
Request Body

{
"endTime": 1537269900000,
"eventProductDetails": [],
"filters": {
"filter": [
{
"categories": {
"correlationEvent": [],
"linkIncidentEvent": [],
"managementServerEvent": [
"Emergency","Alert","Error","Info"
],
"productAuditEvent": [
"Emergency","Alert","Error","Info"
],
"productEvent": [
"Emergency","Alert","Error","Info"
],
"productStatusEvent": [
"Info"
],
"securityEvent": [
"Emergency","Alert","Error"
],
"userActionEvent": [
"Emergency","Alert","Error","Info"
]
},
"excludedEvents": [],
"includedEvents": [
{
"category": "ALL",
"eventColumn": "ACKNOWLEDGED",
"value": "No"
}
]
}
]
},
"pageSize": 100,
"startIndex": 0,
"startTime": 1537266600000
}
Request Response
When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.
{
"events": [
{
"eventID": "9521d239-78ac-4a78-a1d2-3978ac8a7811",
"severity": "Error",
"sourceName": "rhel74_34186",
"sourceAddress": "10.124.72.36",
"lastOccurrenceHostTime": 1538130213556,
"firstOccurenceHostTime": 1538130213556,
"origin": "Application Event",
"eventCategory": "Management Server Event",
"description": "Failed to register SNMP(trap) for the switch 10.155.34.16. The Trap Recipient table is full.",
"correlatedEventIDs": "",
"recommendedActions": "",
"probableCause": "",
"messageId": "SSMP-EVNT-2002",
"ruleName": "",
"rulePolicy": "",
"ackNotes": "",
"ackBy": "",
"sourceType": "OTHERS"
}
],
"eventSeverityGroupSummaryList": [
{
"severityGroup": "ERROR",
"counter": 59
},
{
"severityGroup": "INFO",
"counter": 2
},
{
"severityGroup": "ALERT"
}
],
"startIndex": 0,
"pageSize": 100,
"totalRecords": 61,
"nextPageIndex": "3a42ff68-c588-417f-82ff-68c588617fa3,1538126737459"
}