{"x-generator":"NSwag v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v12.0.0.0))","openapi":"3.0.0","info":{"title":"AaaS-Config API","version":"1.0.0"},"servers":[{"url":"http://localhost:5000"}],"paths":{"/aaas/config/authclientuser":{"post":{"tags":["Config"],"operationId":"Config_AuthClientUser","requestBody":{"x-name":"user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthClientUser"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthClientOutput"}}}}}}},"/aaas/config/getclientbyusername/{username}":{"get":{"tags":["Config"],"operationId":"Config_GetClientByUsername","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOutDto"}}}}}}},"/aaas/config/createnewclient":{"post":{"tags":["Config"],"operationId":"Config_CreateNewClient","requestBody":{"x-name":"clientInDto","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOutDto"}}}}}}},"/aaas/config/updateclient":{"post":{"tags":["Config"],"operationId":"Config_UpdateClient","requestBody":{"x-name":"clientInDto","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOutDto"}}}}}}},"/aaas/config/deleteclient/{clientid}":{"delete":{"tags":["Config"],"operationId":"Config_DeleteClient","parameters":[{"name":"clientid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/getappbykey/{appkey}":{"get":{"tags":["Config"],"operationId":"Config_GetAppByKey","parameters":[{"name":"appkey","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppOutDto"}}}}}}},"/aaas/config/getappbyid/{appid}":{"get":{"tags":["Config"],"operationId":"Config_GetAppById","parameters":[{"name":"appid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppOutDto"}}}}}}},"/aaas/config/createnewapp":{"post":{"tags":["Config"],"operationId":"Config_CreateNewApp","requestBody":{"x-name":"newApp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppOutDto"}}}}}}},"/aaas/config/updateapp":{"post":{"tags":["Config"],"operationId":"Config_UpdateApp","requestBody":{"x-name":"updApp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppOutDto"}}}}}}},"/aaas/config/deleteapp/{appid}":{"delete":{"tags":["Config"],"operationId":"Config_DeleteApp","parameters":[{"name":"appid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/getdetectorsbyappid/{appid}":{"get":{"tags":["Config"],"operationId":"Config_GetDetectorsByAppId","parameters":[{"name":"appid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}}},"/aaas/config/gettelemetricbasebyappid/{appid}":{"get":{"tags":["Config"],"operationId":"Config_GetTelemetricBaseByAppId","parameters":[{"name":"appid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}}},"/aaas/config/getdetectorbyid/{detectorid}":{"get":{"tags":["Config"],"operationId":"Config_GetDetectorById","parameters":[{"name":"detectorid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}},"/aaas/config/createminmaxdetector":{"post":{"tags":["Config"],"operationId":"Config_CreateMinMaxDetector","requestBody":{"x-name":"detector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorMinMaxInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}},"/aaas/config/createslidingwindowdetector":{"post":{"tags":["Config"],"operationId":"Config_CreateSlidingWindowDetector","requestBody":{"x-name":"detector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorSlidingWinInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}},"/aaas/config/updateslidingwindowdetector":{"post":{"tags":["Config"],"operationId":"Config_UpdateSlidingWindowDetector","requestBody":{"x-name":"detector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorSlidingWinInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}},"/aaas/config/updateminmaxdetector":{"post":{"tags":["Config"],"operationId":"Config_UpdateMinMaxDetector","requestBody":{"x-name":"detector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorMinMaxInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorOutDto"}}}}}}},"/aaas/config/deletedetector/{detectorid}":{"delete":{"tags":["Config"],"operationId":"Config_DeleteDetector","parameters":[{"name":"detectorid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/changedetectorstatus/{detectorid}":{"post":{"tags":["Config"],"operationId":"Config_ChangeDetectorStatus","parameters":[{"name":"detectorid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"requestBody":{"x-name":"status","content":{"application/json":{"schema":{"type":"boolean"}}},"required":true,"x-position":2},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/getactionbyid/{actionid}":{"get":{"tags":["Config"],"operationId":"Config_GetActionById","parameters":[{"name":"actionId","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionOutDto"}}}}}}},"/aaas/config/getactionbydetectorid/{detectorid}":{"get":{"tags":["Config"],"operationId":"Config_GetActionByDetectorId","parameters":[{"name":"detectorid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionOutDto"}}}}}}},"/aaas/config/createnewaction":{"post":{"tags":["Config"],"operationId":"Config_CreateNewAction","requestBody":{"x-name":"action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionOutDto"}}}}}}},"/aaas/config/updateaction":{"post":{"tags":["Config"],"operationId":"Config_UpdateAction","requestBody":{"x-name":"action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorActionOutDto"}}}}}}},"/aaas/config/deleteactionofdetector/{detectorid}":{"delete":{"tags":["Config"],"operationId":"Config_DeleteActionOfDetector","parameters":[{"name":"detectorid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/removedetectorfromtelemetric":{"delete":{"tags":["Config"],"operationId":"Config_RemoveDetectorFromTelemetric","parameters":[{"name":"telemetricId","in":"query","schema":{"type":"string","format":"guid"},"x-position":1},{"name":"detectorid","in":"query","schema":{"type":"string","format":"guid"},"x-position":2}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/adddetectortotelemetric":{"post":{"tags":["Config"],"operationId":"Config_AddDetectorToTelemetric","parameters":[{"name":"telemetricId","in":"query","schema":{"type":"string","format":"guid"},"x-position":1},{"name":"detectorid","in":"query","schema":{"type":"string","format":"guid"},"x-position":2}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/gettelemetricbyid/{telemetricid}":{"get":{"tags":["Config"],"operationId":"Config_GetTelemetricById","parameters":[{"name":"telemetricid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}},"/aaas/config/gettelemetricbyname/{name}":{"get":{"tags":["Config"],"operationId":"Config_GetTelemetricByName","parameters":[{"name":"appid","in":"query","schema":{"type":"string","format":"guid"},"x-position":1},{"name":"name","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":2}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}},"/aaas/config/createnewtelemetricbase":{"post":{"tags":["Config"],"operationId":"Config_CreateNewTelemetricBase","requestBody":{"x-name":"telemetric","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}},"/aaas/config/updatetelemetricbase":{"post":{"tags":["Config"],"operationId":"Config_UpdateTelemetricBase","requestBody":{"x-name":"telemetric","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricInDto"}}},"required":true,"x-position":1},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}},"/aaas/config/deletetelemetricbase/{telemetricid}":{"delete":{"tags":["Config"],"operationId":"Config_DeleteTelemetricBase","parameters":[{"name":"telemetricid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/aaas/config/getlogsbytelemetricid/{telemetricId}":{"get":{"tags":["Config"],"operationId":"Config_GetLogsByTelemetricId","parameters":[{"name":"telemetricid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LogMessageOutDto"}}}}}}}},"/aaas/config/getmetricsbytelemetricid/{telemetricId}":{"get":{"tags":["Config"],"operationId":"Config_GetMetricsByTelemetricId","parameters":[{"name":"telemetricid","in":"path","required":true,"schema":{"type":"string","format":"guid"},"x-position":1}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetricOutDto"}}}}}}}},"/aaas/log/{appkey}":{"get":{"tags":["Log"],"operationId":"Log_GetTelemetricByName","parameters":[{"name":"appKey","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1},{"name":"name","in":"query","schema":{"type":"string","nullable":true},"x-position":2}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetricOutDto"}}}}}}},"/aaas/log/{appKey}/addmetric":{"post":{"tags":["Log"],"operationId":"Log_AddMetric","parameters":[{"name":"appKey","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1}],"requestBody":{"x-name":"metric","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricInDto"}}},"required":true,"x-position":2},"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/aaas/log/{appKey}/addlogmessage":{"post":{"tags":["Log"],"operationId":"Log_AddLogMessage","parameters":[{"name":"appKey","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1}],"requestBody":{"x-name":"log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogMessageInDto"}}},"required":true,"x-position":2},"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/aaas/log/{appKey}":{"post":{"tags":["Log"],"operationId":"Log_CloseAndReset","parameters":[{"name":"appKey","in":"path","required":true,"schema":{"type":"string","nullable":true},"x-position":1},{"name":"telemetricId","in":"query","schema":{"type":"string","format":"guid"},"x-position":2}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}}},"components":{"schemas":{"AuthClientOutput":{"type":"object","additionalProperties":false,"properties":{"authentication":{"type":"boolean"},"clientId":{"type":"string","format":"guid"},"apps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AppOutDto"}}}},"AppOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"appName":{"type":"string","nullable":true},"appKey":{"type":"string","nullable":true},"clientId":{"type":"string","format":"guid"}}}]},"BaseDto":{"type":"object","x-abstract":true,"additionalProperties":false,"properties":{"id":{"type":"string","format":"guid"}}},"AuthClientUser":{"type":"object","additionalProperties":false,"required":["userName","password"],"properties":{"userName":{"type":"string"},"password":{"type":"string"}}},"ClientOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"userName":{"type":"string","nullable":true}}}]},"ClientInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["userName","password"],"properties":{"userName":{"type":"string"},"password":{"type":"string"}}}]},"AppInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["appName","clientId"],"properties":{"appName":{"type":"string"},"clientId":{"type":"string","format":"guid"}}}]},"DetectorOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/DetectorType"},"timePeriod":{"type":"integer","format":"int32"},"minThresh":{"type":"number","format":"double","nullable":true},"warnMinThresh":{"type":"number","format":"double","nullable":true},"maxThresh":{"type":"number","format":"double","nullable":true},"warnMaxThresh":{"type":"number","format":"double","nullable":true},"slidingThresh":{"type":"number","format":"double","nullable":true},"warnSlideThresh":{"type":"number","format":"double","nullable":true},"aggregation":{"$ref":"#/components/schemas/DetectorAggregation"},"comparison":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/ComparisonType"}]},"isDeactive":{"type":"boolean"},"appId":{"type":"string","format":"guid"},"telemetrics":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TelemetricOutDto"}},"actionToDetector":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/DetectorActionOutDto"}]}}}]},"DetectorType":{"type":"string","description":"","x-enumNames":["MinMax","SlidingWindow"],"enum":["MinMax","SlidingWindow"]},"DetectorAggregation":{"type":"string","description":"","x-enumNames":["Current","Sum","Average"],"enum":["Current","Sum","Average"]},"ComparisonType":{"type":"string","description":"","x-enumNames":["Smaller","SmallerOrEqual","Equal","BiggerOrEqual","Bigger"],"enum":["Smaller","SmallerOrEqual","Equal","BiggerOrEqual","Bigger"]},"TelemetricOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","nullable":true},"metricType":{"$ref":"#/components/schemas/TelemetricType"},"appId":{"type":"string","format":"guid"},"metricsCount":{"type":"integer","format":"int32"},"logsCount":{"type":"integer","format":"int32"},"detectors":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/DetectorOutDto"}}}}]},"TelemetricType":{"type":"string","description":"","x-enumNames":["Counter","Mesurement"],"enum":["Counter","Mesurement"]},"DetectorActionOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/ActionType"},"detectorId":{"type":"string","format":"guid"},"emailTo":{"type":"string","nullable":true},"webHookUrl":{"type":"string","nullable":true}}}]},"ActionType":{"type":"string","description":"","x-enumNames":["WebHook","SendEmail"],"enum":["WebHook","SendEmail"]},"DetectorMinMaxInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["name","timePeriod","minThresh","warnMinThresh","maxThresh","warnMaxThresh","isDeactive","appId"],"properties":{"name":{"type":"string"},"timePeriod":{"type":"integer","format":"int32"},"minThresh":{"type":"number","format":"double"},"warnMinThresh":{"type":"number","format":"double"},"maxThresh":{"type":"number","format":"double"},"warnMaxThresh":{"type":"number","format":"double"},"isDeactive":{"type":"boolean"},"appId":{"type":"string","format":"guid"},"actionToDetector":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/DetectorActionInDto"}]}}}]},"DetectorActionInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["name","type","emailTo","webHookUrl"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/ActionType"},"detectorId":{"type":"string","format":"guid"},"emailTo":{"type":"string","nullable":true},"webHookUrl":{"type":"string","nullable":true}}}]},"DetectorSlidingWinInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["name","timePeriod","slidingThresh","warnSlideThresh","aggregation","comparison","isDeactive","appId"],"properties":{"name":{"type":"string"},"timePeriod":{"type":"integer","format":"int32"},"slidingThresh":{"type":"number","format":"double"},"warnSlideThresh":{"type":"number","format":"double"},"aggregation":{"$ref":"#/components/schemas/DetectorAggregation"},"comparison":{"$ref":"#/components/schemas/ComparisonType"},"isDeactive":{"type":"boolean"},"appId":{"type":"string","format":"guid"},"actionToDetector":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/DetectorActionInDto"}]}}}]},"TelemetricInDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"required":["name","metricType","appId"],"properties":{"name":{"type":"string"},"metricType":{"$ref":"#/components/schemas/TelemetricType"},"appId":{"type":"string","format":"guid"},"detectorIds":{"type":"array","nullable":true,"items":{"type":"string","format":"guid"}}}}]},"LogMessageOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/LogType"},"message":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"},"telemetricId":{"type":"string","format":"guid"}}}]},"LogType":{"type":"string","description":"","x-enumNames":["Trace","Error","Warning"],"enum":["Trace","Error","Warning"]},"MetricOutDto":{"allOf":[{"$ref":"#/components/schemas/BaseDto"},{"type":"object","additionalProperties":false,"properties":{"counter":{"type":"integer","format":"int32"},"mesurement":{"type":"number","format":"double"},"timestamp":{"type":"string","format":"date-time"},"telemetricId":{"type":"string","format":"guid"}}}]},"MetricInDto":{"type":"object","additionalProperties":false,"required":["timestamp","telemetricId"],"properties":{"mesurement":{"type":"number","format":"double"},"timestamp":{"type":"string","format":"date-time"},"telemetricId":{"type":"string","format":"guid"}}},"LogMessageInDto":{"type":"object","additionalProperties":false,"required":["messageType","timestamp","telemetricId"],"properties":{"messageType":{"$ref":"#/components/schemas/LogType2"},"message":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"},"telemetricId":{"type":"string","format":"guid"}}},"LogType2":{"type":"integer","description":"","x-enumNames":["Trace","Error","Warning"],"enum":[0,5,10]}}}}