一组TimeSeriesIds从Azure Time Series Insights Preview API返回错误

时间:2019-08-12 09:06:45

标签: azure-timeseries-insights

我们正在尝试从Azure时间序列见解预览API中获取值。

此请求:

{
"getEvents": {
    "timeSeriesId": [
        "3 - 1179 - Temperatur"
    ],
    "searchSpan": {
        "from": "2019-07-02T06:00:00Z",
        "to": "2019-07-23T10:13:36.067Z"
    }
}

和此请求:

{
    "getEvents": {
        "timeSeriesId": [
            "3 - 1175 - Temperatur"
        ],
        "searchSpan": {
            "from": "2019-07-02T06:00:00Z",
            "to": "2019-07-23T10:13:36.067Z"
        }
    }
}

可以单独使用,但是在尝试将它们合并为单个请求时:

{
    "getEvents": {
        "timeSeriesId": [
            "3 - 1175 - Temperatur", "3 - 1179 - Temperatur"
        ],
        "searchSpan": {
            "from": "2019-07-02T06:00:00Z",
            "to": "2019-07-23T10:13:36.067Z"
        }
    }
}

我们收到以下答复:

{
    "error": {
        "code": "InvalidInput",
        "message": "Values in a single time series ID '[\"3 - 1175 - Temperatur\",\"3 - 1179 - Temperatur\"]' must match the time series ID properties '[SeriesId:String]' defined for the environment.",
        "innerError": {
            "code": "TimeSeriesIdValueMismatch"
        }
    }
}

据我所知,它基本上意味着TimeSeriesId并不存在,但它们可以单独工作。从文档(https://docs.microsoft.com/en-us/rest/api/time-series-insights/preview-query)中,我只能理解这应该起作用吗?

来自文档的示例查询:

    {
  "getEvents": {
    "timeSeriesId": ["PU.123","W00158","ABN.9890"],
    "timeSeriesName" : null,
    "searchSpan": {
        "from":  "2016-08-01T00:00:00Z",
        "to":  "2016-08-01T00:16:50Z"
    },
    "filter": { "tsx": "($event.Value.Double != null) OR ($event.Status.String = 'Good')"
    },
    "projectedProperties": [{"name":"Building","type":"String"}, {"name":"Temperature","type":"Double"}]
  }
 }

0 个答案:

没有答案