{"type":"api","title":"Get Events according to request criteria","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/9792902d-b2cb-3a50-8089-29b3532bc5ed","info":{"title":"Crosswork Alarms and Events APIs","description":"Crosswork Alarms and Events APIs allow applications to create, update, acknowledge and clear alarms.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/FAULT_MANAGEMENT/fault-infra-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://{server_ip}:30603/crosswork/alarm/v1","description":"Alarm/Alarm-Rest"}]},"spec":{"tags":["Alarm"],"summary":"Get Events according to request criteria","description":"Get Alarms according to criteria in the request.\u003cbr\u003e `type`: Possible values include system,network,device\u003cbr\u003e `eventSeverity`: Possible values include critical,major,minor,warning,information,cleared\u003cbr\u003e `filterCondition`: Possible values include and,or\u003cbr\u003e `sortParams`: Possible values include updated.DESC, updated.ASC\u003cbr\u003e\n\n 'Note: Audit logs will be supported in old API (/alarms/v1/event/query) in 7.0. Seperate api for Auditlog will be provided in future.'","operationId":"getEvents","requestBody":{"content":{"application/json":{"schema":{"title":"Request Events proto, FilterCondition for Event","type":"object","description":"Request Events proto, FilterCondition for Event","required":["filterParams"],"properties":{"filterParams":{"title":"FilterParams for events","type":"object","description":"FilterParams for events","required":["type","eventCategory"],"properties":{"type":{"type":"string","description":"The type of events to filter by","enum":["system","network","device"],"example":"system"},"eventId":{"type":"string","description":"The unique identifier of the event to filter by"},"object_description":{"type":"string","description":"A description of the object related to the event"},"eventCategory":{"type":"string","description":"The category of events to filter by"},"Source":{"type":"string","description":"The source of events to filter by"},"generatedBy":{"type":"string","description":"The entity that generated the events to filter by"},"eventSeverity":{"type":"string","description":"The severity of the events to filter by","enum":["critical","major","minor","warning","information","cleared"],"example":"major"},"eventName":{"type":"string","description":"The event name to filter events by"},"description":{"type":"string","description":"A description to filter events by"},"alarm_id":{"type":"string","description":"The ID of the alarm associated with the events to filter by"},"timestamp":{"type":"string","description":"The timestamp to filter events by"}},"$$ref":"#/components/schemas/FilterEventParams"},"filterCondition":{"type":"string","description":"The condition to apply for filtering events","enum":["and","or"],"example":"and"},"sortParams":{"type":"string","example":"timestamp.DESC/ASC","description":"The parameters to sort the events by"},"range":{"type":"string","description":"The range of events to return","default":"0-100"}},"$$ref":"#/components/schemas/alarmsV2GetEventsReq"},"example":{"filterParams":{"type":"system","eventCategory":"System"},"filterCondition":"and","sortParams":"notificationTimestamp.DESC","range":"0-100"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"title":"Alarm Response","type":"object","description":"Alarm Event Response","properties":{"eventName":{"type":"string","description":"The name of the event related to the alarm. Event type can be system/network/device"},"type":{"type":"string","enum":["system","network","device"],"example":"system","description":"The type of alarm"},"alarm_id":{"type":"string","description":"The unique identifier for the alarm"},"notificationDeliveryMechanism":{"type":"string","description":"The mechanism used to deliver notifications"},"deviceUUID":{"type":"string","nullable":true,"description":"The UUID of the device related to the alarm"},"applicationSpecificID":{"type":"string","description":"An application-specific identifier for the alarm"},"object_description":{"type":"string","description":"A user-friendly description of the object related to the alarm"},"generatedBy":{"type":"string","description":"The entity that generated the alarm"},"deviceTimestamp":{"type":"string","description":"The timestamp on the device when the alarm was generated"},"eventCategory":{"type":"string","description":"The category of the event related to the alarm"},"timestamp":{"type":"string","description":"The timestamp when the event occurred"},"eventId":{"type":"string","description":"The unique identifier for the event"},"eventSeverity":{"type":"string","enum":["CRITICAL","MAJOR","MINOR","WARNING","INFORMATION","CLEARED"],"example":"MAJOR","description":"The severity of the event can be CRITICAL/MAJOR/MINOR/WARNING/INFORMATION/CLEARED"},"flagging":{"type":"boolean","description":"Whether the event is flagging an alarm"},"description":{"type":"string","description":"A description of the event"},"displayName":{"type":"string","description":"A user-friendly display name for the event"},"source":{"type":"string","description":"The source from which the event originated"}},"$$ref":"#/components/schemas/alarmV2EventResponse"},"example":{"events":[{"eventName":"1000","type":"system","alarm_id":"b8118710-f37b-4874-814d-b12592af399b","notificationDeliveryMechanism":"APPLICATION","deviceUUID":"","applicationSpecificID":"cw-distributed-cache-1-1000##SubAlarm@@_1","deviceTimestamp":"","eventCategory":"System","timestamp":"January 9, 2025 6:50:28 AM UTC","generatedBy":"capp-infra","eventId":"2f1e76e2-b5ec-4efc-bc56-ae9ca8e7393e","eventSeverity":"CLEARED","flagging":true,"description":"cw-distributed-cache-1 is healthy.","displayName":"cw-distributed-cache-1 is healthy.","source":"robot-orch-7fc58bbf74-fl26g"},{"eventName":"6","type":"system","alarm_id":"25652023-1048-4046-ae0c-b72578c2b794","notificationDeliveryMechanism":"APPLICATION","deviceUUID":"","generatedBy":"capp-infra:astackserver","deviceTimestamp":"","applicationSpecificID":"health-6##SubAlarm@@_4","eventId":"915c50f7-ffe7-4b17-8cf4-026b4253db3a","eventSeverity":"CLEARED","flagging":true,"description":"health check ok","timestamp":"January 9, 2025 7:52:08 AM UTC","eventCategory":"System","displayName":"astack-server running","source":"astackserver"}],"total":"2"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"type":"object","description":"Runtime Error Event message","properties":{"error":{"type":"string","description":"The error message"},"code":{"type":"integer","description":"The error code"},"message":{"type":"string","description":"A detailed message explaining the error"}},"$$ref":"#/components/schemas/runtimeErrorEvent"},"example":{"error":"Fail","code":0,"message":"Error while fetching events"}}}}},"__originalOperationId":"getEvents","method":"post","path":"/event/query"}}