{"type":"api","title":"Get Alarms 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 Alarms according to request criteria","description":"Get Alarms according to criteria in the request.\u003cbr\u003e `type`: Possible values include system,network,device\u003cbr\u003e `state`: 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","operationId":"getAlarms","requestBody":{"content":{"application/json":{"schema":{"title":"Request Alarms proto, FilterCondition for alarms","type":"object","description":"Request Alarms proto, FilterCondition for alarms","required":["filterParams"],"properties":{"filterParams":{"title":"FilterParams for alarms","type":"object","description":"FilterParams for alarms","required":["type","alarmCategory"],"properties":{"type":{"type":"string","description":"The type of alarms to filter by","enum":["system","network","device"],"example":"system"},"alarmId":{"type":"string","description":"The unique identifier of the alarm to filter by"},"alarmCategory":{"type":"string","description":"The category of alarms to filter by"},"state":{"type":"string","enum":["critical","major","minor","warning","information","cleared"],"example":"major","description":"The state of the alarms to filter by"},"description":{"type":"string","description":"A description to filter alarms by"},"source":{"type":"string","description":"The source of alarms to filter by"},"generatedBy":{"type":"string","description":"The entity that generated the alarms to filter by"},"displayName":{"type":"string","description":"The display name to filter alarms by"},"eventName":{"type":"string","description":"The event name to filter alarms by"}},"$$ref":"#/components/schemas/FilterParams"},"filterCondition":{"type":"string","enum":["and","or"],"example":"and","description":"The condition to apply for filtering alarms"},"openAlarmsOnly":{"type":"boolean","default":false,"description":"Whether to only include open alarms"},"sortParams":{"type":"string","example":"updated.DESC/ASC","description":"The parameters to sort the alarms by"},"range":{"type":"string","default":"0-100","description":"The range of alarms to return"}},"$$ref":"#/components/schemas/alarmsV2GetAlarmsReq"},"example":{"filterParams":{"type":"system","alarmCategory":"System"},"filterCondition":"and","sortParams":"updated.DESC","range":"0-100"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"title":"Alarm Query Response","type":"object","description":"Alarm Query Response","properties":{"alarms":{"type":"array","description":"An array of alarmsV2AlarmResponse objects","items":{"title":"Alarm Response","type":"object","description":"Alarm Response","properties":{"eventName":{"type":"string","description":"The name of the event related to the alarm. Type can be System or network or device"},"type":{"type":"string","enum":["system","network","device"],"example":"system","description":"The type of 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"},"created":{"type":"string","description":"The timestamp when the alarm was created"},"updated":{"type":"string","description":"The timestamp when the alarm was last updated"},"alarmCategory":{"type":"string","description":"The category of the alarm"},"acknowledge":{"type":"boolean","description":"Whether the alarm has been acknowledged"},"alarmId":{"type":"string","description":"The unique identifier for the alarm"},"displayName":{"type":"string","description":"A user-friendly display name for the alarm"},"description":{"type":"string","description":"The description of the alarm"},"applicationSpecificID":{"type":"string","description":"An application-specific identifier for the alarm. State can be CRITICAL/MAJOR/MINOR/WARNING/INFORMATION/CLEARED"},"state":{"type":"string","enum":["CRITICAL","MAJOR","MINOR","WARNING","INFORMATION","CLEARED"],"example":"MAJOR","description":"The current state of the alarm"},"source":{"type":"string","description":"The source from which the alarm originated"},"notes":{"type":"string","description":"Any notes associated with the alarm"},"generatedBy":{"type":"string","description":"The entity that generated the alarm"},"deviceTimestamp":{"type":"string","nullable":true,"description":"The timestamp on the device when the alarm was generated"},"total":{"type":"string","format":"int64","description":"The total number of related items or events"}},"$$ref":"#/components/schemas/alarmsV2AlarmResponse"}},"total":{"type":"string","description":"The total number of alarms returned in the response"}},"$$ref":"#/components/schemas/alarmsV2AlarmResponseQuery"},"example":{"alarms":[{"eventName":"6","type":"system","notificationDeliveryMechanism":"APPLICATION","deviceUUID":"","applicationSpecificID":"health-6##SubAlarm@@_4","created":"January 7, 2025 5:52:42 AM UTC","updated":"January 9, 2025 7:36:09 AM UTC","alarmCategory":"System","acknowledge":false,"alarmId":"25652023-1048-4046-ae0c-b72578c2b794","generatedBy":"capp-infra:astackserver","deviceTimestamp":"","description":"health check ok","displayName":"pipeline","state":"CLEARED","source":"astackserver"},{"eventName":"HEALTH_CACHE_REACHABILITY","type":"system","notificationDeliveryMechanism":"APPLICATION","deviceUUID":"","applicationSpecificID":"health.cache.reachability.cw-distributed-cache-0-HEALTH_CACHE_REACHABILITY##SubAlarm@@_1","created":"January 6, 2025 1:00:08 PM UTC","updated":"January 9, 2025 7:35:09 AM UTC","alarmCategory":"System","acknowledge":false,"alarmId":"fc9e0b37-d390-42ba-9f8b-eb12bb73b25e","generatedBy":"capp-infra","deviceTimestamp":"","description":"cw-distributed-cache-0 connected","displayName":"Distributed Cache Service","state":"CLEARED","source":"distributed-cache"}],"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 alarms"}}}}},"__originalOperationId":"getAlarms","method":"post","path":"/query"}}