openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 24.8 kB
JSON
{"openapi":"3.0.0","info":{"description":"The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.","title":"Anomaly Detector Client","version":"1.0","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"cognitiveservices-AnomalyDetector","x-tags":["Azure","Microsoft"]},"security":[{"apiKeyHeader":[]}],"paths":{"/timeseries/changePoint/detect":{"post":{"description":"Evaluate change point score of every series point","operationId":"ChangePointDetect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePointDetectRequest"}}},"description":"Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.","required":true},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePointDetectResponse"},"examples":{"Detect change point example":{"$ref":"#/components/examples/Detect_change_point_example"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}},"summary":"Detect change point for the entire series"}},"/timeseries/entire/detect":{"post":{"description":"This operation generates a model using an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.","operationId":"EntireDetect","requestBody":{"$ref":"#/components/requestBodies/Request"},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntireDetectResponse"},"examples":{"Find anomalies for the entire series in batch example":{"$ref":"#/components/examples/Find_anomalies_for_the_entire_series_in_batch_example"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}},"summary":"Detect anomalies for the entire series in batch."}},"/timeseries/last/detect":{"post":{"description":"This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.","operationId":"LastDetect","requestBody":{"$ref":"#/components/requestBodies/Request"},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LastDetectResponse"},"examples":{"Detect anomaly status of the latest point in time series example":{"$ref":"#/components/examples/Detect_anomaly_status_of_the_latest_point_in_time_series_example"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}},"summary":"Detect anomaly status of the latest point in time series."}}},"servers":[{"url":"https://azure.local"},{"url":"{Endpoint}/anomalydetector/v1.0","variables":{"Endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).","x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"default":"none"}}}],"components":{"examples":{"Detect_change_point_example":{"value":{"confidenceScores":[0.11841763735063232,0.014857199927548581,0.0887032374955278,0.07430314751946857,0.059903057543409355,0.04132288981790399,0.022742722092391268,0.0005683208474757854,0.0216060803974397,0.053248991089971616,0.08489190178249614,0.04322511558132514,0.085336620199234,0.05876047041512903,0.02673755265447302,0.005032027060762012,0.031323171543775764,0.06299774949197792,0.08944723025337244,0.11523169864554421,0.14288453512268834,0.001592562559717675,0.32637788222282893,0,7.37310752217245e-15,2.211932256651735e-14,1,0.015697015891758138,0.01242773215043403,0.016188579169534697,0.019537751864826272,0.022506917491993753,0.01885762668253081,0.016253355310429398,0.017227483829906676,0.023236706002118527,0.03906277743439327,0.0354134866249377,0.037084294769315296,0.038248426822850935,0.050274427573818385,0.046815140298421175,0.043292518511668716,0.041353259508804745,0.038242312045861385,0.0346880230034313,0.032717096744889713,0.033026212895129546,0.031055286636580585,0.0275326648498355,0.023883374040372555,0.021564107969369743,0.018706498551854727,0.01543721481052325,0.015176320358565887,0.011527029549110314,0.008004407762357859,0.004355116952902286,0.0007058261434393403,0.0030701336887340946,0.006592755475479178,0.010147044517909256,0.013701333560339335,0.016780613767597707,0.020366570065705403,0.024015860875168354,0.02757014991759106,0.03033275756808058,0.03068865378707081,0.03395793752839492,0.03760722833785786,0.04122485189164318,0.030433874112103007,0.032816474694461056,0.03602242392443729,0.03960838022253762,0.04268766042980336,0.04633695123926631,0.0346592903007527,0.010219725324164698,0.007218892441326965,0.006909776291079754,0.000049463551460760754,0.0016047901503119819,0.01042121060065547,0.009020294944303705,0.005371004134840759,0.0021650549048718984,0.010517653997227793,0.0075017083013172925,0.00385241749186172,0.0008681390516288423,0.019005920148370017,0.015388296594592068,0.12583612799160215,1,0.005055878353042495,0.007613932468790628,0.011913685646822731,0.0166567804043268,0.015351429327405014,0.034309821169245976,0.0292817211106433,0.02425362105202589,0.019225520993423218,0.01419742093482055,0.00916932087621788,0.004141220817600464,0.0008868792410022057,0.0059149792996048755,0.010943079358207547,0.015971179416810213,0.02099927947542763,1,0.11533376425564247,0.1207645081246342,0.025174230145423273,0.09422487163021387,0.08417070843230404,0.07411654523437947,0.06406238203646963,0.0540082188385598,0.04395405564064997,0.03500824639144218,0.024954083193532338,0.014899919995622513,0.004845756797712681,0.005208406400211895,0.015262569598121728,0.025316732796031558,0.03537089599394139,0.045425059191865964,0.05145748091871777,1,0.011663506282381296,0.0043856580970499884,0.002892190088273945,0.01017003827359788,0.01744788645892181,0.024725734644253115,0.03200358282957705,0.03928143101490098,0.046559279200224915,0.05383712738555622,0.060069956133518614,0.0450857235774741,0.050621872700536176,0.029050850963546225,0.045689493056171517,0.0385699811492357,0.03179880905474635,0.03082274474926925,0.03586345902254038,0.028585610837209074,0.021402764418918006,0.04705886213832124,0.049724532235770696,0.05957866937203304,0.052649160999162954,0.045371312813839014,0.03809346462851508,0.030815616443183775,0.023537768257859845,0.01945831289597576,0.012180464710644455,0.00490261652532052,0.002153560870260057,0.0033196287098028916,0.0029244412792105113,0.0043217396504358,0.010934575466529664,0.018117421884820732,0.02267188608187652,0.027321352045957807,0.03459920023128174,0.03563859904812146,0.02990120514994264,0.03607069938654979,0.017223061637835352,7.37310752217245e-15,1.47462150443449e-14,1,0.046440552438977135,0.012233652454378385,0.017033155644526038,0.05136672465183527,0.06970832954194527,0.09929181019761117,0.11281999222473732,0.11039622919405537,0.08125609011787617,0.05661270134791935,0.028264243663680723,0.005974323576610399,0.038471191754617544,0,0,0,0.020288532128574968,0.005041879493223223,0.009223088216122232,0.009332792637570532,0.024579445272937026,0.03289096891488949,0.050695883419617865,1,0.000748013913075547,0.002186373999917361,0.0009330173541465358,0.00032033929162428933,0.0012886906362965138,0.002542047282052593,0.0007963481454318109,0.0004886757560166365,0.0016470306347398486,0.001063686451208582,0.0011980222832366648,0.00008700161821178273,0.0013086910082902394,0.0022770423529624643,0.000016333637160404937,0.0012053557529180517,0.0018570345408140537,0.0037297360397815314,0.003109724507563151,0.22869458705263188,0.2293374323429407,0.1140021204394844,0.0012381896969537412,0.11340677603264777,1,0.011793249472519423,0.008293225072094536,0.00469819890465153,0.0010715054815308995,0.0025551879416044767,0.006118546853369862,0.008605219072110835,0.0053601180131874334,0.008860142413597574,0.01248683583673295,0.01611352925985358,0.005878587160222206,0.013145429690188892,0.022280640305150038,0.01865394688201466,0.015027253458894031,0.012033905149325846,0.009040556839742916,0.005445530672299909,0.0018505045048569009,0.001744521662600853,0.005339547830043862,0.008760404091259945,0.012181260352490777,0.009902010591734853,0.007622760830993676],"isChangePoint":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],"period":0}},"Find_anomalies_for_the_entire_series_in_batch_example":{"value":{"expectedValues":[827.7940908243968,798.9133774671927,888.6058431807189,900.5606407986661,962.8389426378304,933.2591606306954,891.0784104799666,856.1781601363697,809.8987227908941,807.375129007505,764.3196682448518,803.933498594564,823.5900620883058,794.0905641334288,883.164245249282,894.8419000690953,956.8430591101258,927.6285055190114,885.812983784303,851.6424797402517,806.0927886943216,804.6826815312029,762.74070738882,804.0251702513732,825.3523662579559,798.0404188724976,889.3016505577698,902.4226124345937,965.867078532635,937.3200495736695,896.1720524711102,862.0087368413656,816.4662342097423,814.4297745524709,771.8614479159354,811.859271346729,831.8998279215521,802.947544797165,892.5684407435083,904.5488214533809,966.8527063844707,937.3168391003043,895.180003672544,860.3649596356635,814.1707285969043,811.9054862686213,769.1083769610742,809.2328084659704],"isAnomaly":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],"isNegativeAnomaly":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],"isPositiveAnomaly":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],"lowerMargins":[41.389704541219835,39.94566887335964,44.43029215903594,45.02803203993331,48.14194713189152,46.66295803153477,44.55392052399833,42.808908006818484,40.494936139544706,40.36875645037525,38.215983412242586,40.196674929728196,41.17950310441529,39.70452820667144,44.1582122624641,44.74209500345477,47.84215295550629,46.38142527595057,44.290649189215145,42.58212398701258,40.30463943471608,40.234134076560146,38.137035369441,40.201258512568664,41.267618312897795,39.90202094362488,44.46508252788849,45.121130621729684,48.29335392663175,46.86600247868348,44.80860262355551,43.100436842068284,40.82331171048711,40.721488727623544,38.593072395796774,40.59296356733645,41.5949913960776,40.14737723985825,44.62842203717541,45.227441072669045,48.34263531922354,46.86584195501521,44.759000183627194,43.01824798178317,40.70853642984521,40.59527431343106,38.45541884805371,40.46164042329852],"period":12,"upperMargins":[41.389704541219835,39.94566887335964,44.43029215903594,45.02803203993331,48.14194713189152,46.66295803153477,44.55392052399833,42.808908006818484,40.494936139544706,40.36875645037525,38.215983412242586,40.196674929728196,41.17950310441529,39.70452820667144,44.1582122624641,44.74209500345477,47.84215295550629,46.38142527595057,44.290649189215145,42.58212398701258,40.30463943471608,40.234134076560146,38.137035369441,40.201258512568664,41.267618312897795,39.90202094362488,44.46508252788849,45.121130621729684,48.29335392663175,46.86600247868348,44.80860262355551,43.100436842068284,40.82331171048711,40.721488727623544,38.593072395796774,40.59296356733645,41.5949913960776,40.14737723985825,44.62842203717541,45.227441072669045,48.34263531922354,46.86584195501521,44.759000183627194,43.01824798178317,40.70853642984521,40.59527431343106,38.45541884805371,40.46164042329852]}},"Detect_anomaly_status_of_the_latest_point_in_time_series_example":{"value":{"expectedValue":809.2328084659704,"isAnomaly":false,"isNegativeAnomaly":false,"isPositiveAnomaly":false,"lowerMargin":40.46164042329852,"period":12,"suggestedWindow":49,"upperMargin":40.46164042329852}}},"parameters":{"Endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).","in":"path","name":"Endpoint","required":true,"x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"schema":{"type":"string"}}},"requestBodies":{"Request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}},"description":"Time series points and period if needed. Advanced model parameters can also be set in the request.","required":true}},"securitySchemes":{"apiKeyHeader":{"in":"header","name":"Ocp-Apim-Subscription-Key","type":"apiKey"}},"schemas":{"APIError":{"description":"Error information returned by the API.","properties":{"code":{"description":"The error code.","enum":["InvalidCustomInterval","BadArgument","InvalidGranularity","InvalidPeriod","InvalidModelArgument","InvalidSeries","InvalidJsonFormat","RequiredGranularity","RequiredSeries"],"x-ms-enum":{"modelAsString":true,"name":"AnomalyDetectorErrorCodes"}},"message":{"description":"A message explaining the error reported by the service.","type":"string"}},"type":"object"},"ChangePointDetectRequest":{"properties":{"customInterval":{"$ref":"#/components/schemas/CustomInterval"},"granularity":{"$ref":"#/components/schemas/Granularity"},"period":{"description":"Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically.","format":"int32","type":"integer"},"series":{"description":"Time series data points. Points should be sorted by timestamp in ascending order to match the change point detection result.","items":{"$ref":"#/components/schemas/Point"},"type":"array"},"stableTrendWindow":{"description":"Optional argument, advanced model parameter, a default stableTrendWindow will be used in detection.","format":"int32","type":"integer"},"threshold":{"description":"Optional argument, advanced model parameter, between 0.0-1.0, the lower the value is, the larger the trend error will be which means less change point will be accepted.","format":"float","type":"number"}},"required":["granularity","series"],"type":"object"},"ChangePointDetectResponse":{"properties":{"confidenceScores":{"description":"the change point confidence of each point","items":{"format":"float","type":"number","nullable":false},"type":"array"},"isChangePoint":{"description":"isChangePoint contains change point properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.","items":{"type":"boolean","nullable":false},"type":"array"},"period":{"description":"Frequency extracted from the series, zero means no recurrent pattern has been found.","format":"int32","type":"integer"}},"required":["isChangePoint","confidenceScores","period"],"type":"object"},"CustomInterval":{"description":"Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {\"granularity\":\"minutely\", \"customInterval\":5}.","format":"int32","type":"integer","nullable":false},"EntireDetectResponse":{"properties":{"expectedValues":{"description":"ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.","items":{"format":"float","type":"number","nullable":false},"type":"array"},"isAnomaly":{"description":"IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.","items":{"type":"boolean","nullable":false},"type":"array"},"isNegativeAnomaly":{"description":"IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.","items":{"type":"boolean","nullable":false},"type":"array"},"isPositiveAnomaly":{"description":"IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.","items":{"type":"boolean","nullable":false},"type":"array"},"lowerMargins":{"description":"LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.","items":{"format":"float","type":"number","nullable":false},"type":"array"},"period":{"description":"Frequency extracted from the series, zero means no recurrent pattern has been found.","format":"int32","type":"integer"},"upperMargins":{"description":"UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.","items":{"format":"float","type":"number","nullable":false},"type":"array"}},"required":["expectedValues","isAnomaly","isNegativeAnomaly","isPositiveAnomaly","lowerMargins","period","upperMargins"],"type":"object"},"Granularity":{"description":"Can only be one of yearly, monthly, weekly, daily, hourly or minutely. Granularity is used for verify whether input series is valid.","enum":["yearly","monthly","weekly","daily","hourly","minutely"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"Granularity"},"nullable":false},"LastDetectResponse":{"properties":{"expectedValue":{"description":"Expected value of the latest point.","format":"float","type":"number"},"isAnomaly":{"description":"Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction.","type":"boolean"},"isNegativeAnomaly":{"description":"Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one.","type":"boolean"},"isPositiveAnomaly":{"description":"Anomaly status in positive direction of the latest point. True means the latest point is an anomaly and its real value is larger than the expected one.","type":"boolean"},"lowerMargin":{"description":"Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. ","format":"float","type":"number"},"period":{"description":"Frequency extracted from the series, zero means no recurrent pattern has been found.","format":"int32","type":"integer"},"suggestedWindow":{"description":"Suggested input series points needed for detecting the latest point.","format":"int32","type":"integer"},"upperMargin":{"description":"Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed.","format":"float","type":"number"}},"required":["expectedValue","isAnomaly","isNegativeAnomaly","isPositiveAnomaly","lowerMargin","period","upperMargin","suggestedWindow"],"type":"object"},"Point":{"properties":{"timestamp":{"description":"Timestamp of a data point (ISO8601 format).","format":"date-time","type":"string"},"value":{"description":"The measurement of that point, should be float.","format":"float","type":"number"}},"required":["timestamp","value"],"type":"object"},"Request":{"properties":{"customInterval":{"$ref":"#/components/schemas/CustomInterval"},"granularity":{"$ref":"#/components/schemas/Granularity"},"maxAnomalyRatio":{"description":"Optional argument, advanced model parameter, max anomaly ratio in a time series.","format":"float","type":"number"},"period":{"description":"Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically.","format":"int32","type":"integer"},"sensitivity":{"description":"Optional argument, advanced model parameter, between 0-99, the lower the value is, the larger the margin value will be which means less anomalies will be accepted.","format":"int32","type":"integer"},"series":{"description":"Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned.","items":{"$ref":"#/components/schemas/Point"},"type":"array"}},"required":["granularity","series"],"type":"object"}}}}