{"openapi":"3.0.1","info":{"title":"Eyer swagger","version":"1.0.0"},"components":{"responses":{"UnauthorizedError":{"description":"Authentication information is missing or invalid"}},"parameters":{"from-required":{"name":"from","in":"query","required":true,"description":"","schema":{"type":"string","format":"date-time"}},"to-required":{"name":"to","in":"query","required":true,"description":"","schema":{"type":"string","format":"date-time"}},"to-optional":{"name":"to","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}},"with-metrics":{"name":"with-metrics","in":"query","required":false,"description":"Defines if alerts should contain corridors and stats","schema":{"type":"boolean"}}},"schemas":{"event_type":{"type":"string","enum":["created","updated","ended"]},"event_occured":{"type":"string","format":"date-time"},"severity":{"type":"string","description":"Anomaly severity","enum":["low","medium","severe"]},"anomaly":{"type":"object","description":"Group of anomalies on a single node","properties":{"severity":{"$ref":"#/components/schemas/severity"},"severity_num":{"type":"integer","description":"Anomaly severity's numerical representation: 1 for low, 2 for medium and 3 for high"},"nodes_affected":{"type":"integer","description":"Number of nodes included in the anomaly"},"metrics_affected":{"type":"integer","description":"Number of metrics included in the anomaly"},"event_occured":{"$ref":"#/components/schemas/event_occured"},"event_type":{"$ref":"#/components/schemas/event_type"},"id":{"type":"string","format":"uuid","description":"Anomaly ID"},"items":{"type":"array","description":"Individual anomalies that consistute the group","items":{"allOf":[{"$ref":"#/components/schemas/anomaly_item"}]}}}},"anomaly_item":{"type":"object","description":"Mapping between a node and associated anomalies","properties":{"node":{"description":"A node that anomalies are associated with","allOf":[{"$ref":"#/components/schemas/node"}]},"metrics":{"type":"array","description":"Anomalies on individual metrics included","items":{"allOf":[{"$ref":"#/components/schemas/anomaly_item_metric"}]}}}},"anomaly_item_metric":{"type":"object","description":"An anomaly on a single metric","properties":{"id":{"type":"string","description":"Unique metric id"},"name":{"type":"string","description":"Metric description"},"metric_type":{"type":"string","description":"Metric type. One of: integer, double, boolean"},"aggregation":{"type":"string","description":"Metric aggregation. One of: avg, max, sum"},"severity":{"$ref":"#/components/schemas/severity"},"severity_num":{"type":"integer","description":"Anomaly severity's numerical representation: 1 for low, 2 for medium and 3 for high"},"started":{"type":"string","format":"date-time","description":"Anomaly start timestamp"},"updated":{"type":"string","format":"date-time","description":"Anomaly last updated timestamp"}}},"metered_anomalies_grouped":{"type":"object","description":"List of anomaly groups on nodes across the system, including per-metric data","properties":{"new":{"type":"array","description":"Anomalies that were discovered during the time period","items":{"allOf":[{"$ref":"#/components/schemas/metered_anomaly"}]}},"updated":{"type":"array","description":"Anomalies that were updated during the time period. Note that if anomaly is existing, but was not updated, it won't be returned.","items":{"allOf":[{"$ref":"#/components/schemas/metered_anomaly"}]}},"closed":{"type":"array","description":"Anomalies that were closed during the time period","items":{"allOf":[{"$ref":"#/components/schemas/metered_anomaly"}]}}}},"trimmed_anomaly":{"type":"object","description":"Group of anomalies on a single node, including per-metric data","properties":{"severity":{"$ref":"#/components/schemas/severity"},"severity_num":{"type":"integer","description":"Anomaly severity's numerical representation: 1 for low, 2 for medium and 3 for high"},"nodes_affected":{"type":"integer","description":"Number of nodes included in the anomaly"},"metrics_affected":{"type":"integer","description":"Number of metrics included in the anomaly"},"event_occured":{"$ref":"#/components/schemas/event_occured"},"event_type":{"$ref":"#/components/schemas/event_type"},"id":{"type":"string","description":"Parent alert ID"},"update_id":{"type":"string","description":"Anomaly update ID"}}},"metered_anomaly":{"type":"object","description":"Group of anomalies on a single node, including per-metric data","properties":{"severity":{"$ref":"#/components/schemas/severity"},"severity_num":{"type":"integer","description":"Anomaly severity's numerical representation: 1 for low, 2 for medium and 3 for high"},"nodes_affected":{"type":"integer","description":"Number of nodes included in the anomaly"},"metrics_affected":{"type":"integer","description":"Number of metrics included in the anomaly"},"event_occured":{"$ref":"#/components/schemas/event_occured"},"event_type":{"$ref":"#/components/schemas/event_type"},"id":{"type":"string","format":"uuid","description":"Anomaly ID"},"items":{"type":"array","description":"Individual anomalies that consistute the group","items":{"allOf":[{"$ref":"#/components/schemas/metered_anomaly_item"}]}}}},"metered_anomaly_item":{"type":"object","description":"Mapping between a node and associated anomalies, including per-metric data","properties":{"node":{"description":"A node that anomalies are associated with","allOf":[{"$ref":"#/components/schemas/node"}]},"metrics":{"type":"array","description":"Anomalies on individual metrics included","items":{"allOf":[{"$ref":"#/components/schemas/metered_anomaly_item_detection_data"}]}}}},"metered_anomaly_item_detection_data":{"type":"object","description":"An anomaly on a single metric, including per-metric data","properties":{"id":{"type":"string","description":"Unique metric id"},"name":{"type":"string","description":"Metric description"},"metric_type":{"type":"string","description":"Metric type. One of: integer, double, boolean"},"aggregation":{"type":"string","description":"Metric aggregation. One of: avg, max, sum"},"severity":{"type":"string","description":"Anomaly severity","enum":["low","medium","severe"]},"severity_num":{"type":"integer","description":"Anomaly severity's numerical representation: 1 for low, 2 for medium and 3 for high"},"started":{"type":"string","format":"date-time","description":"Anomaly start timestamp"},"updated":{"type":"string","format":"date-time","description":"Anomaly last updated timestamp"},"data":{"type":"array","description":"Data received by the system in the selection time range, sorted by timestamp","items":{"allOf":[{"$ref":"#/components/schemas/metric_detection_data"}]}}}},"metric_detection_data":{"type":"object","description":"A single data point and normal behaviour range for comparison","properties":{"timestamp":{"type":"string","format":"date-time","description":"Data point timestamp"},"smoothened":{"type":"number","description":"Smoothen view used in ML"},"corridors":{"allOf":[{"$ref":"#/components/schemas/metric_corridor_set"}],"description":"Normal primary and secondary behaviour range"}}},"metric_corridor_set":{"type":"object","description":"Normal primary and secondary behaviour range","properties":{"main":{"description":"Main corridor, most frequent behaviour","allOf":[{"$ref":"#/components/schemas/metric_corridor"}]},"sup":{"description":"Superior secondary corridor, frequent deviations with value higher than the main behaviour","allOf":[{"$ref":"#/components/schemas/metric_corridor"}]},"inf":{"description":"Inferior secondary corridor, frequent deviations with value lower than from the main behaviour","allOf":[{"$ref":"#/components/schemas/metric_corridor"}]}}},"metric_corridor":{"type":"object","description":"Expected range generated by ML","properties":{"up":{"type":"number","description":"Upper limit"},"down":{"type":"number","description":"Lower limit"}}},"node":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Node ID"},"name":{"type":"string","description":"Node name"},"system":{"allOf":[{"$ref":"#/components/schemas/system"}],"description":"System that nodes belongs to"}}},"system":{"type":"object","description":"A group of nodes that consistutes a physical system","properties":{"id":{"type":"integer","format":"int64","description":"System ID"},"name":{"type":"string","description":"System name"}}}}},"paths":{"/v2/corridors/{node-id}/{metric-id}/forecast":{"get":{"parameters":[{"in":"path","name":"node-id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"metric-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v2/metrics/{node-id}/{metric-id}":{"get":{"parameters":[{"in":"path","name":"node-id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"metric-id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/from-required"},{"$ref":"#/components/parameters/to-required"},{"in":"query","name":"aggregation","required":false,"schema":{"type":"string","enum":["avg","max","sum"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"node":{"type":"integer"},"metric":{"type":"string"},"aggregation":{"type":"string","enum":["avg","max","sum"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/metric_detection_data"}}}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/anomalies/current":{"get":{"parameters":[{"$ref":"#/components/parameters/to-optional"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/anomaly"}}}}}}}},"/v2/anomalies/{alert-id}/details/{update-id}":{"get":{"parameters":[{"in":"path","name":"alert-id","required":true,"schema":{"type":"string"}},{"in":"path","name":"update-id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/with-metrics"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metered_anomaly"}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/anomalies/{alert-id}":{"get":{"parameters":[{"in":"path","name":"alert-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/trimmed_anomaly"}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/anomalies/unread":{"get":{"parameters":[{"$ref":"#/components/parameters/to-optional"},{"$ref":"#/components/parameters/with-metrics"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metered_anomalies_grouped"}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/anomalies":{"get":{"parameters":[{"$ref":"#/components/parameters/to-required"},{"$ref":"#/components/parameters/from-required"},{"$ref":"#/components/parameters/with-metrics"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/metered_anomaly"}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/alerts/explore/timeseries":{"get":{"parameters":[{"in":"query","name":"from","required":true,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","required":true,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"bucket","required":true,"schema":{"type":"string","enum":["15m","1h","4h","1d"]}},{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"nodeId","required":false,"schema":{"type":"integer"}},{"in":"query","name":"statTypeId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Explore timeseries","content":{"application/json":{"schema":{"type":"object","properties":{"bucket":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"buckets":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"active":{"type":"integer"},"impacts":{"type":"object","properties":{"low":{"type":"integer"},"medium":{"type":"integer"},"high":{"type":"integer"},"severe":{"type":"integer"}}}}}}}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/alerts/explore":{"get":{"parameters":[{"in":"query","name":"at","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"impact","required":false,"schema":{"type":"string","enum":["low","medium","high","severe","any"]}},{"in":"query","name":"minScore","required":false,"schema":{"type":"number"}},{"in":"query","name":"nodeId","required":false,"schema":{"type":"integer"}},{"in":"query","name":"statTypeId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Explore alerts list","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"active":{"type":"boolean"},"firstSeenAt":{"type":"string","format":"date-time","nullable":true},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"impact":{"type":"string","enum":["low","medium","high","severe"],"nullable":true},"activeNodes":{"type":"integer","nullable":true},"activeMetrics":{"type":"integer","nullable":true},"score":{"type":"number","nullable":true},"learningStatus":{"type":"number","nullable":true}}}}}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/alerts/{alertId}/events/{sequenceNumber}":{"get":{"parameters":[{"in":"path","name":"alertId","required":true,"schema":{"type":"string"}},{"in":"path","name":"sequenceNumber","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Single alert event by sequence number (includes changes)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sequence":{"type":"integer"},"eventType":{"$ref":"#/components/schemas/event_type"},"eventOccurred":{"$ref":"#/components/schemas/event_occured"},"active":{"type":"boolean"},"impact":{"type":"string","enum":["low","medium","high","severe"]},"activeNodes":{"type":"integer"},"activeMetrics":{"type":"integer"},"score":{"type":"number","nullable":true},"learningStatus":{"type":"number","nullable":true},"changes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["added","updated","removed"]},"nodeId":{"type":"integer"},"nodeName":{"type":"string","nullable":true},"statTypeId":{"type":"string"},"statTypeName":{"type":"string","nullable":true},"systemId":{"type":"integer","nullable":true},"systemName":{"type":"string","nullable":true},"values":{"type":"object","nullable":true,"properties":{"score":{"type":"object","properties":{"contribution":{"type":"number"},"adjusted":{"type":"number"}}},"learningStatus":{"type":"number"},"severity":{"type":"string","enum":["green","yellow","orange","red","blood_red"]},"type":{"type":"string","enum":["missing_data","deviation"],"nullable":true},"closestBaselineDeviation":{"type":"number","nullable":true}}}}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"description":"Event not found"}}}},"/v2/alerts/{alertId}/events":{"get":{"parameters":[{"in":"path","name":"alertId","required":true,"schema":{"type":"string"},"description":"Alert identifier"},{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1},"description":"Page number (1-based), default 1"},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Page size, default 10, max 100"},{"in":"query","name":"expand","required":false,"schema":{"type":"string"},"description":"Comma-separated; use \"changes\" to include per-event changes"}],"responses":{"200":{"description":"List of alert events in chronological order","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sequence":{"type":"integer"},"eventType":{"$ref":"#/components/schemas/event_type"},"eventOccurred":{"$ref":"#/components/schemas/event_occured"},"active":{"type":"boolean"},"impact":{"type":"string","enum":["low","medium","high","severe"]},"activeNodes":{"type":"integer"},"activeMetrics":{"type":"integer"},"score":{"type":"number","nullable":true},"learningStatus":{"type":"number","nullable":true},"changes":{"type":"array","description":"Present only when expand=changes","items":{"type":"object","properties":{"type":{"type":"string","enum":["added","updated","removed"]},"nodeId":{"type":"integer"},"nodeName":{"type":"string","nullable":true},"statTypeId":{"type":"string"},"statTypeName":{"type":"string","nullable":true},"systemId":{"type":"integer","nullable":true},"systemName":{"type":"string","nullable":true},"values":{"type":"object","nullable":true,"properties":{"score":{"type":"object","properties":{"contribution":{"type":"number"},"adjusted":{"type":"number"}}},"learningStatus":{"type":"number"},"severity":{"type":"string","enum":["green","yellow","orange","red","blood_red"]},"type":{"type":"string","enum":["missing_data","deviation"],"nullable":true},"closestBaselineDeviation":{"type":"number","nullable":true}}}}}}}}}}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/v2/alerts/{alertId}":{"get":{"parameters":[{"in":"path","name":"alertId","required":true,"schema":{"type":"string"}},{"in":"query","name":"at","required":false,"schema":{"type":"string","format":"date-time"},"description":"Point-in-time to reconstruct alert (returns 404 if alert not active then)"}],"responses":{"200":{"description":"Alert view with metrics","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"firstSeenAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"impact":{"type":"string","enum":["low","medium","high","severe"]},"activeNodes":{"type":"integer"},"activeMetrics":{"type":"integer"},"score":{"type":"number","nullable":true},"learningStatus":{"type":"number","nullable":true},"metrics":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"integer"},"nodeName":{"type":"string","nullable":true},"statTypeId":{"type":"string"},"statTypeName":{"type":"string","nullable":true},"systemId":{"type":"integer","nullable":true},"systemName":{"type":"string","nullable":true},"score":{"type":"object","properties":{"adjusted":{"type":"number"},"contribution":{"type":"number"}}},"learningStatus":{"type":"number"},"severity":{"type":"string"},"type":{"type":"string","enum":["missing_data","deviation"],"nullable":true},"closestBaselineDeviation":{"type":"number","nullable":true}}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"description":"Alert not found or not active at requested time"}}}},"/v2/alerts":{"get":{"parameters":[{"in":"query","name":"at","required":false,"schema":{"type":"string","format":"date-time"},"description":"Point-in-time to reconstruct alerts (if omitted, returns current active alerts)"},{"in":"query","name":"expand","required":false,"schema":{"type":"string"},"description":"Comma-separated expansions; use \"metrics\" to include metric list"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Alert ID"},"lastSeenAt":{"type":"string","format":"date-time"},"firstSeenAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"impact":{"type":"string","enum":["low","medium","high","severe"]},"activeNodes":{"type":"integer"},"activeMetrics":{"type":"integer"},"score":{"type":"number","nullable":true},"learningStatus":{"type":"number","nullable":true},"metrics":{"type":"array","description":"Present only when expand=metrics","items":{"type":"object","properties":{"nodeId":{"type":"integer"},"nodeName":{"type":"string","nullable":true},"statTypeId":{"type":"string"},"statTypeName":{"type":"string","nullable":true},"systemId":{"type":"integer","nullable":true},"systemName":{"type":"string","nullable":true},"score":{"type":"object","properties":{"adjusted":{"type":"number"},"contribution":{"type":"number"}}},"learningStatus":{"type":"number"},"severity":{"type":"string"},"type":{"type":"string","enum":["missing_data","deviation"],"nullable":true},"closestBaselineDeviation":{"type":"number","nullable":true}}}}}}}}}},"400":{"description":"Wrong or missing parameter"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/UnauthorizedError"}}}}},"tags":[]}