{"type":"api","title":"Create and raise an event","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":"Create and raise an event","operationId":"createEvent","requestBody":{"content":{"application/json":{"schema":{"title":"An Event structure, an application/service will post this proto as an input\nfor the Alarm Center to create Events and Alarms","type":"object","description":"An Event structure, an application/service will post this proto as an input for the Alarm Center to create Events and Alarms","properties":{"EventId":{"type":"string","description":"Generated uuid to identify uniquely the event. Will be generated by the client lib."},"Source":{"title":"The source of this event","type":"string","description":"The source from which the event originated"},"GeneratedBy":{"title":"Generated by of this event","type":"string","description":"The entity that generated this event"},"ApplicationSpecificID":{"title":"The ApplicationSpecificID of this event","type":"string","description":"A specific identifier related to the application"},"DisplayName":{"title":"The Display Name of this event","type":"string","description":"A user-friendly display name for the event"},"eventName":{"title":"Event Name","type":"string","description":"The name of the event"},"Timestamp":{"type":"string","description":"The time this event was created. Will be filled by the client lib.","format":"int64"},"EventSeverity":{"title":"Defines the Event/Alarm severity","type":"string","description":"The severity level of the event or alarm","default":"InvalidSeverity","enum":["InvalidSeverity","Clear","Info","Warning","Minor","Major","Critical"],"$$ref":"#/components/schemas/alarmsSeverity"},"Description":{"type":"string","description":"A free text, parametrized, description. Do not need to fill if there is an event type..."},"Params":{"title":"Parameters for the event case Text","type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs of parameters for the event"},"EventCategory":{"title":"Defines the Category of the Event/Alarm","type":"string","enum":["System","Network","Security","External"],"description":"The category of the event or alarm can be System/Network/Security/External","$$ref":"#/components/schemas/alarmsCategoryUpdate"},"Flagging":{"title":"If the event is a flagging event, e.g. raise an alarm","type":"boolean","description":"Whether the event should flag an alarm"},"event_case":{"title":"Event case","type":"integer","format":"int32","description":"The specific case or scenario for the event"},"originServicePodId":{"title":"API is applicable for System & Network events only","type":"string","description":"Identifier for the service pod where the event originated"}},"$$ref":"#/components/schemas/alarmsV2Event"},"example":{"Flagging":true,"EventSeverity":"Info","eventName":"CsPolicyAlarm","ApplicationSpecificID":"2000:100:100:10::105#100.100.100.1#33","Description":"Circuit-Style Policy srte_c_33_ep_100.100.100.1: policy state: Down","DisplayName":"2.195.165.300-CsPolicyAlarm","Source":"2.194.59.600-CsPolicyAlarm","GeneratedBy":"cw.topo_svc","Timestamp":"12344322233","EventCategory":"Network"}}},"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":{"state":"Success","eventId":"f99b913f-acf0-4fc5-ab85-95affb35eeab","alarmId":"b6711b59-cbc4-4a22-a798-d7916dd0694c"}}}},"403":{"description":"Authentication and Authorization errors"},"500":{"description":"operation-failed Response with error"}},"__originalOperationId":"createEvent","method":"post","path":"/event"}}