Query - Execute
在結果頁面中執行時間序列查詢 - 取得事件、取得數列或匯總數列。
POST https://{environmentFqdn}/timeseries/query?api-version=2020-07-31
POST https://{environmentFqdn}/timeseries/query?api-version=2020-07-31&storeType={storeType}
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
environment
|
path | True |
string |
每個環境 FQDN,例如 10000000-0000-0000-0000-100000000109.env.timeseries.azure.com。 您可以從取得環境 API、Azure 入口網站 或 Azure Resource Manager 的回應中取得此功能變數名稱。 |
api-version
|
query | True |
string |
要與用戶端要求搭配使用的 API 版本。 目前支援的版本是 「2020-07-31」。 |
store
|
query |
string |
針對已啟用暖存放區的環境,可以在 'WarmStore' 或 'ColdStore' 上執行查詢。 這個查詢中參數會定義應執行查詢的存放區。 如果未定義,則會在冷存放區上執行查詢。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
x-ms-continuation |
string |
來自上一頁結果的接續令牌,以擷取支援分頁之呼叫中結果的下一頁。 若要取得第一頁結果,請將 Null 接續令牌指定為參數值。 如果已傳回所有結果,則傳回的接續標記為 Null,而且沒有下一頁的結果。 |
|
x-ms-client-request-id |
string |
選擇性用戶端要求識別碼。 服務會記錄此值。 允許服務跨服務追蹤作業,並允許客戶連絡有關特定要求的支持人員。 |
|
x-ms-client-session-id |
string |
選擇性用戶端會話識別碼。 服務會記錄此值。 允許服務追蹤跨服務的相關作業群組,並允許客戶連絡支持人員,以取得特定要求群組的相關信息。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
aggregateSeries |
匯總數列查詢。 允許從指定時間序列標識元和搜尋範圍的事件計算匯總的時間序列。 |
|
getEvents |
取得事件查詢。 允許擷取指定時間序列標識碼和搜尋範圍的未經處理事件。 |
|
getSeries |
取得數列查詢。 允許從指定時間序列標識碼和搜尋範圍的事件中擷取計算變數值的時間序列。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功的查詢。 標題 x-ms-request-id: string |
|
Other Status Codes |
非預期的錯誤。 標題 x-ms-request-id: string |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
ColdStoreQueryAggregateSeriesPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"Count": {
"kind": "aggregate",
"filter": null,
"aggregation": {
"tsx": "count()"
}
},
"MinTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "min($value)"
}
},
"MaxTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "max($value)"
}
}
},
"projectedVariables": [
"Count",
"MinTemperature",
"MaxTemperature"
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryAggregateSeriesPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"Count": {
"kind": "aggregate",
"filter": null,
"aggregation": {
"tsx": "count()"
}
},
"MinTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "min($value)"
}
},
"MaxTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "max($value)"
}
}
},
"projectedVariables": [
"Count",
"MinTemperature",
"MaxTemperature"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:00Z",
"2016-08-01T00:01:00Z",
"2016-08-01T00:02:00Z",
"2016-08-01T00:03:00Z",
"2016-08-01T00:04:00Z",
"2016-08-01T00:05:00Z",
"2016-08-01T00:06:00Z",
"2016-08-01T00:07:00Z",
"2016-08-01T00:08:00Z",
"2016-08-01T00:09:00Z",
"2016-08-01T00:10:00Z"
],
"properties": [
{
"name": "Count",
"type": "Long",
"values": [
50,
60,
60,
60,
60,
60,
60,
60,
60,
60,
null
]
},
{
"name": "AverageTemperature",
"type": "Double",
"values": [
71.25,
85,
82.5,
80,
89.16666666666667,
75,
90,
75.83333333333333,
85,
82.5,
null
]
},
{
"name": "MinTemperature",
"type": "Double",
"values": [
65.125,
77.625,
65.125,
72.625,
65.125,
67.625,
82.625,
65.125,
77.625,
65.125,
null
]
},
{
"name": "MaxTemperature",
"type": "Double",
"values": [
77.375,
92.375,
99.875,
87.375,
99.875,
82.375,
97.375,
99.875,
92.375,
99.875,
null
]
}
],
"progress": 100
}
ColdStoreQueryGetEventsPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetEventsPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetEventsPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
67.575
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAbCDewidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetEventsPage4
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [],
"properties": [],
"progress": 100
}
ColdStoreQueryGetSeriesPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetSeriesPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z",
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375,
67.625
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetSeriesPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=coldstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
QueryAggregateSeriesPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"Count": {
"kind": "aggregate",
"filter": null,
"aggregation": {
"tsx": "count()"
}
},
"MinTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "min($value)"
}
},
"MaxTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "max($value)"
}
}
},
"projectedVariables": [
"Count",
"MinTemperature",
"MaxTemperature"
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryAggregateSeriesPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"Count": {
"kind": "aggregate",
"filter": null,
"aggregation": {
"tsx": "count()"
}
},
"MinTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "min($value)"
}
},
"MaxTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "max($value)"
}
}
},
"projectedVariables": [
"Count",
"MinTemperature",
"MaxTemperature"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:00Z",
"2016-08-01T00:01:00Z",
"2016-08-01T00:02:00Z",
"2016-08-01T00:03:00Z",
"2016-08-01T00:04:00Z",
"2016-08-01T00:05:00Z",
"2016-08-01T00:06:00Z",
"2016-08-01T00:07:00Z",
"2016-08-01T00:08:00Z",
"2016-08-01T00:09:00Z",
"2016-08-01T00:10:00Z"
],
"properties": [
{
"name": "Count",
"type": "Long",
"values": [
50,
60,
60,
60,
60,
60,
60,
60,
60,
60,
null
]
},
{
"name": "AverageTemperature",
"type": "Double",
"values": [
71.25,
85,
82.5,
80,
89.16666666666667,
75,
90,
75.83333333333333,
85,
82.5,
null
]
},
{
"name": "MinTemperature",
"type": "Double",
"values": [
65.125,
77.625,
65.125,
72.625,
65.125,
67.625,
82.625,
65.125,
77.625,
65.125,
null
]
},
{
"name": "MaxTemperature",
"type": "Double",
"values": [
77.375,
92.375,
99.875,
87.375,
99.875,
82.375,
97.375,
99.875,
92.375,
99.875,
null
]
}
],
"progress": 100
}
QueryAggregateSeriesWithCategoricalInterpolatedVariable
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"aggregateSeries": {
"searchSpan": {
"from": "2019-10-10T23:41:04.021Z",
"to": "2019-10-10T23:42:22.846Z"
},
"timeSeriesId": [
"Sensor_58"
],
"interval": "PT2S",
"inlineVariables": {
"Status_String": {
"kind": "categorical",
"value": {
"tsx": "$event.[Status].String"
},
"interpolation": {
"kind": "Step",
"boundary": {
"span": "PT5S"
}
},
"categories": [
{
"label": "Good",
"values": [
"Good",
"Very Good",
"Excellent"
]
},
{
"label": "Bad",
"values": [
"Bad",
"OK"
]
},
{
"label": "Other",
"values": [
"Other"
]
}
],
"defaultCategory": {
"label": "Unknown"
}
},
"Status_Long": {
"kind": "categorical",
"value": {
"tsx": "tolong($event.[Status].Double)"
},
"interpolation": {
"kind": "Step",
"boundary": {
"span": "PT5S"
}
},
"categories": [
{
"label": "Good",
"values": [
0,
1,
2
]
},
{
"label": "Bad",
"values": [
3,
4
]
},
{
"label": "Other",
"values": [
5
]
}
],
"defaultCategory": {
"label": "Unknown"
}
}
},
"projectedVariables": [
"Status_String",
"Status_Long"
]
}
}
範例回覆
{
"timestamps": [
"2019-10-10T23:41:04Z",
"2019-10-10T23:41:06Z",
"2019-10-10T23:41:08Z",
"2019-10-10T23:41:10Z",
"2019-10-10T23:41:12Z",
"2019-10-10T23:41:14Z",
"2019-10-10T23:41:16Z",
"2019-10-10T23:41:18Z",
"2019-10-10T23:41:20Z",
"2019-10-10T23:41:22Z"
],
"properties": [
{
"values": [
0.203,
0.141,
0.268,
0.398,
0.402,
0.047,
0.1245,
0.75,
0.206,
0.2635
],
"name": "Status_String[Good]",
"type": "Double"
},
{
"values": [
0.266,
0.1955,
0.242,
0.148,
0.25,
0.055,
0.6295,
0.109,
0.41,
0.2125
],
"name": "Status_String[Bad]",
"type": "Double"
},
{
"values": [
0.5205,
0.6635,
0.49,
0.454,
0.348,
0.898,
0.246,
0.141,
0.384,
0.524
],
"name": "Status_String[Other]",
"type": "Double"
},
{
"values": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"name": "Status_String[Unknown]",
"type": "Double"
},
{
"values": [
0.203,
0.141,
0.268,
0.398,
0.402,
0.047,
0.1245,
0.75,
0.206,
0.2635
],
"name": "Status_Long[Good]",
"type": "Double"
},
{
"values": [
0.266,
0.1955,
0.242,
0.148,
0.25,
0.055,
0.6295,
0.109,
0.41,
0.2125
],
"name": "Status_Long[Bad]",
"type": "Double"
},
{
"values": [
0.5205,
0.6635,
0.49,
0.454,
0.348,
0.898,
0.246,
0.141,
0.384,
0.524
],
"name": "Status_Long[Other]",
"type": "Double"
},
{
"values": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"name": "Status_Long[Unknown]",
"type": "Double"
}
],
"progress": 100
}
QueryAggregateSeriesWithCategoricalVariable
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"aggregateSeries": {
"searchSpan": {
"from": "2019-10-10T23:42:00.000Z",
"to": "2019-10-10T23:42:20.000Z"
},
"timeSeriesId": [
"Sensor_58"
],
"interval": "PT2S",
"inlineVariables": {
"Status_String": {
"kind": "categorical",
"value": {
"tsx": "$event.[Status].String"
},
"categories": [
{
"label": "Good",
"values": [
"Good",
"Very Good",
"Excellent"
]
},
{
"label": "Bad",
"values": [
"Bad",
"OK"
]
},
{
"label": "Other",
"values": [
"Other"
]
}
],
"defaultCategory": {
"label": "Unknown"
}
},
"Status_Long": {
"kind": "categorical",
"value": {
"tsx": "tolong($event.[Status].Double)"
},
"categories": [
{
"label": "Good",
"values": [
0,
1,
2
]
},
{
"label": "Bad",
"values": [
3,
4
]
},
{
"label": "Other",
"values": [
5
]
}
],
"defaultCategory": {
"label": "Unknown"
}
}
},
"projectedVariables": [
"Status_String",
"Status_Long"
]
}
}
範例回覆
{
"timestamps": [
"2019-10-10T23:42:00Z",
"2019-10-10T23:42:02Z",
"2019-10-10T23:42:04Z",
"2019-10-10T23:42:06Z",
"2019-10-10T23:42:08Z",
"2019-10-10T23:42:10Z",
"2019-10-10T23:42:12Z",
"2019-10-10T23:42:14Z",
"2019-10-10T23:42:16Z",
"2019-10-10T23:42:18Z"
],
"properties": [
{
"values": [
5,
8,
4,
6,
9,
8,
3,
6,
5,
8
],
"name": "Status_String[Good]",
"type": "Long"
},
{
"values": [
4,
3,
3,
5,
5,
3,
9,
7,
7,
7
],
"name": "Status_String[Bad]",
"type": "Long"
},
{
"values": [
11,
9,
13,
9,
6,
9,
8,
7,
8,
5
],
"name": "Status_String[Other]",
"type": "Long"
},
{
"values": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"name": "Status_String[Unknown]",
"type": "Long"
},
{
"values": [
5,
8,
4,
6,
9,
8,
3,
6,
5,
8
],
"name": "Status_Long[Good]",
"type": "Long"
},
{
"values": [
4,
3,
3,
5,
5,
3,
9,
7,
7,
7
],
"name": "Status_Long[Bad]",
"type": "Long"
},
{
"values": [
11,
9,
13,
9,
6,
9,
8,
7,
8,
5
],
"name": "Status_Long[Other]",
"type": "Long"
},
{
"values": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"name": "Status_Long[Unknown]",
"type": "Long"
}
],
"progress": 100
}
QueryAggregateSeriesWithSampleInterpolation
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"LinearSampleInterpolation": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"interpolation": {
"kind": "Linear",
"boundary": {
"span": "P1D"
}
},
"aggregation": {
"tsx": "left($value)"
}
},
"StepSampleInterpolation": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"interpolation": {
"kind": "Step",
"boundary": {
"span": "P1D"
}
},
"aggregation": {
"tsx": "left($value)"
}
}
},
"projectedVariables": [
"LinearSampleInterpolation",
"StepSampleInterpolation"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:00Z",
"2016-08-01T00:01:00Z",
"2016-08-01T00:02:00Z",
"2016-08-01T00:03:00Z",
"2016-08-01T00:04:00Z",
"2016-08-01T00:05:00Z",
"2016-08-01T00:06:00Z",
"2016-08-01T00:07:00Z",
"2016-08-01T00:08:00Z",
"2016-08-01T00:09:00Z",
"2016-08-01T00:10:00Z"
],
"properties": [
{
"name": "LinearSampleInterpolation",
"type": "Double",
"values": [
50,
60,
60,
60,
60,
60,
60,
60,
60,
60,
62
]
},
{
"name": "StepSampleInterpolation",
"type": "Double",
"values": [
71.25,
85,
82.5,
80,
89.16666666666667,
75,
90,
75.83333333333333,
85,
82.5,
84
]
}
],
"progress": 100
}
QueryGetEventsPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetEventsPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
QueryGetEventsPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
67.575
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAbCDewidGFrZSI6MTAwMH0="
}
QueryGetEventsPage4
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [],
"properties": [],
"progress": 100
}
QueryGetEventsWithTakePage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
],
"take": 10
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetEventsWithTakePage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
],
"take": 10
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375
]
}
],
"progress": 100
}
QueryGetSeriesPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetSeriesPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z",
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375,
67.625
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
QueryGetSeriesPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
QueryGetSeriesWithTakePage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
],
"take": 10
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetSeriesWithTakePage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
],
"take": 10
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z",
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375,
67.625
]
}
],
"progress": 100
}
WarmStoreQueryAggregateSeriesPage
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"aggregateSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"interval": "PT1M",
"inlineVariables": {
"Count": {
"kind": "aggregate",
"filter": null,
"aggregation": {
"tsx": "count()"
}
},
"MinTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "min($value)"
}
},
"MaxTemperature": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "max($value)"
}
}
},
"projectedVariables": [
"Count",
"MinTemperature",
"MaxTemperature"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:00Z",
"2016-08-01T00:01:00Z",
"2016-08-01T00:02:00Z",
"2016-08-01T00:03:00Z",
"2016-08-01T00:04:00Z",
"2016-08-01T00:05:00Z",
"2016-08-01T00:06:00Z",
"2016-08-01T00:07:00Z",
"2016-08-01T00:08:00Z",
"2016-08-01T00:09:00Z",
"2016-08-01T00:10:00Z"
],
"properties": [
{
"name": "Count",
"type": "Long",
"values": [
50,
60,
60,
60,
60,
60,
60,
60,
60,
60,
null
]
},
{
"name": "AverageTemperature",
"type": "Double",
"values": [
71.25,
85,
82.5,
80,
89.16666666666667,
75,
90,
75.83333333333333,
85,
82.5,
null
]
},
{
"name": "MinTemperature",
"type": "Double",
"values": [
65.125,
77.625,
65.125,
72.625,
65.125,
67.625,
82.625,
65.125,
77.625,
65.125,
null
]
},
{
"name": "MaxTemperature",
"type": "Double",
"values": [
77.375,
92.375,
99.875,
87.375,
99.875,
82.375,
97.375,
99.875,
92.375,
99.875,
null
]
}
],
"progress": 100
}
WarmStoreQueryGetEventsPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetEventsPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium",
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetEventsPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "Building",
"type": "String",
"values": [
"Millenium"
]
},
{
"name": "Temperature",
"type": "Double",
"values": [
67.575
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAbCDewidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetEventsPage4
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getEvents": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"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"
}
]
}
}
範例回覆
{
"timestamps": [],
"properties": [],
"progress": 100
}
WarmStoreQueryGetSeriesPage1
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetSeriesPage2
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:10Z",
"2016-08-01T00:00:11Z",
"2016-08-01T00:00:12Z",
"2016-08-01T00:00:13Z",
"2016-08-01T00:00:14Z",
"2016-08-01T00:00:15Z",
"2016-08-01T00:00:16Z",
"2016-08-01T00:00:17Z",
"2016-08-01T00:00:18Z",
"2016-08-01T00:00:19Z",
"2016-08-01T00:00:20Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
65.125,
65.375,
65.625,
65.875,
66.125,
66.375,
66.625,
66.875,
67.125,
67.375,
67.625
]
}
],
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAxYZwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetSeriesPage3
範例要求
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31&storeType=warmstore
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
範例回覆
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
定義
名稱 | Description |
---|---|
Aggregate |
匯總數列查詢。 允許從指定時間序列標識元和搜尋範圍的事件計算匯總的時間序列。 |
Aggregate |
匯總變數代表任何匯總計算。 匯總變數不支援插補。 |
Boundary |
要用於插補的搜尋範圍左邊和右邊的時間範圍。 這在接近輸入搜尋範圍的開始或結尾處遺失數據點的情況下很有説明。 可以是 null。 |
Categorical |
類別變數代表必須根據發生一組有限定義值的計數或持續時間進行分析的訊號。 |
Date |
時間範圍。 不可以是 Null 或負數。 |
Event |
已儲存或計算之事件的屬性。 屬性會以名稱和類型來識別。 不同的事件可以有相同名稱的屬性,但類型不同。 |
Get |
取得事件查詢。 允許擷取指定時間序列標識碼和搜尋範圍的原始事件。 |
Get |
取得數列查詢。 允許從指定時間序列標識碼和搜尋範圍的事件中擷取計算變數值的時間序列。 |
Interpolation |
要對原始數據點執行的插補作業。 目前只允許取樣插補的時間序列。 允許的聚合函數 - 例如:左 ($value) 。 如果不需要套用插補點,則可以為 Null。 |
Interpolation |
插補技術的類型:「Linear」 或 「Step」。。 |
Numeric |
數值變數代表單一連續數值訊號,可使用插補重新建構。 |
Property |
屬性的類型。 |
Property |
對應至時間戳的單一屬性值。 可能包含 Null。 值的型別符合 屬性的類型。 |
Query |
要求對事件執行時間序列查詢。 必須設定 「getEvents」、「getSeries」或「aggregateSeries」的其中一個。 |
Query |
查詢結果的單一頁面。 如果查詢尚未完成,頁面將會設定接續令牌。 在此情況下,若要取得下一頁的結果,請使用接續令牌參數再次傳送相同的要求。 如果查詢已完成,接續令牌為 null。 當尚未計算任何查詢結果時,也可以取得只有接續令牌集的空白頁面。 如果分頁已完成 (接續令牌為 null) ,則如果沒有要傳回數據,時間戳和屬性可能會是空的。 |
Time |
類別變數中使用的類別。 類別是由 'label' 和指派此標籤的 'values' 所定義。 |
Time |
表示預設類別。 |
Tsi |
API 錯誤的相關信息。 |
Tsi |
具有錯誤碼和訊息的特定 API 錯誤。 |
Tsi |
其他錯誤資訊。 |
Tsx |
時間序列表達式 (TSX) 寫入為單一字串。 範例:「$event。Status.String='Good',“avg ($event。溫度) 」。 請參閱有關如何撰寫時間序列表達式的檔。 |
AggregateSeries
匯總數列查詢。 允許從指定時間序列標識元和搜尋範圍的事件計算匯總的時間序列。
名稱 | 類型 | Description |
---|---|---|
filter |
最上層篩選會限制要考慮計算的事件數目。 此篩選條件是 AND'ed,其中包含每個變數中的篩選。 範例:「$event。Status.String='Good'”。 選擇性。 |
|
inlineVariables |
object |
這可讓用戶選擇性地定義內嵌變數,除了模型中已定義的變數之外。 當內嵌變數名稱與模型的名稱相同時,內嵌變數定義會優先使用。 可以是 null。 |
interval |
string |
間隔大小是以 ISO-8601 持續時間格式指定。 所有間隔的大小都相同。 一個月一律轉換成 30 天,一年一律為 365 天。 範例:1 分鐘是 “PT1M”,1 毫秒是 “PT0.001S”。 如需詳細資訊,請參閱 https://www.w3.org/TR/xmlschema-2/#duration |
projectedVariables |
string[] |
這可讓用戶選擇性地選取需要投影的變數。 當它是 null 或未設定時,會傳回 inlineVariables 和 model 中的所有變數。 可以是 null。 |
searchSpan |
執行查詢的時間範圍。 不可以是 null。 |
|
timeSeriesId |
Time |
單一時間序列標識碼值,可唯一識別單一時間序列實例 (例如裝置) 。 請注意,如果在建立環境時將多個屬性指定為時間序列標識符,則可以複合單一時間序列標識符。 值的位置和類型必須符合環境所指定的時間序列標識元屬性,並由取得模型設定 API 傳回。 不可以是 null。 |
AggregateVariable
匯總變數代表任何匯總計算。 匯總變數不支援插補。
名稱 | 類型 | Description |
---|---|---|
aggregation |
當種類為 「匯總」時,匯總時間序列表達式是用來表示需要直接使用「$event」等事件屬性執行的匯總。溫度」。 例如,計算溫度變更範圍的匯總可以寫入為:「最大 ($event。溫度) 分鐘 ($event。溫度) 」。 |
|
filter |
篩選限制要考慮計算之事件數目的事件。 範例:「$event。Status.String='Good'”。 選擇性。 |
|
kind |
string:
aggregate |
允許的“kind” 值為 - “numeric” 或 “aggregate”。 雖然「數值」可讓您指定重建訊號的值,以及匯總它們的運算式,但「匯總」種類可讓您直接匯總事件屬性,而不需要指定值。 |
Boundary
要用於插補的搜尋範圍左邊和右邊的時間範圍。 這在接近輸入搜尋範圍的開始或結尾處遺失數據點的情況下很有説明。 可以是 null。
名稱 | 類型 | Description |
---|---|---|
span |
string |
CategoricalVariable
類別變數代表必須根據發生一組有限定義值的計數或持續時間進行分析的訊號。
名稱 | 類型 | Description |
---|---|---|
categories |
類別變數中使用的類別。 類別是由 'label' 和指派此標籤的 'values' 所定義。 |
|
defaultCategory |
表示預設類別。 |
|
filter |
篩選限制要考慮計算之事件數目的事件。 範例:「$event。Status.String='Good'”。 選擇性。 |
|
interpolation |
類別變數只支援 『step』 插補。 |
|
kind |
string:
categorical |
允許的“kind” 值為 - “numeric” 或 “aggregate”。 雖然「數值」可讓您指定重建訊號的值,以及匯總它們的運算式,但「匯總」種類可讓您直接匯總事件屬性,而不需要指定值。 |
value |
值時間序列表達式是用來表示要分類之訊號的值。 它只能評估為類別變數的 『String』 或 'Long' 類型。 |
DateTimeRange
時間範圍。 不可以是 Null 或負數。
名稱 | 類型 | Description |
---|---|---|
from |
string |
時間範圍的開始時間戳。 在時間序列查詢要求中使用時,開始時間戳是包含的。 包含具有此時間戳的事件。 |
to |
string |
時間範圍的結束時間戳。 在時間序列查詢要求中使用結束時間戳是獨佔的。 排除符合此時間戳的事件。 請注意,Get Availability (傳回結束時間戳時會包含結束時間戳,這表示有一個事件具有這個確切的“to” 時間戳) 。 |
EventProperty
已儲存或計算之事件的屬性。 屬性會以名稱和類型來識別。 不同的事件可以有相同名稱的屬性,但類型不同。
名稱 | 類型 | Description |
---|---|---|
name |
string |
屬性的名稱。 |
type |
屬性的類型。 |
GetEvents
取得事件查詢。 允許擷取指定時間序列標識碼和搜尋範圍的原始事件。
名稱 | 類型 | Description |
---|---|---|
filter |
將套用至查詢中所有變數之查詢的選擇性最上層篩選。 範例:「$event。Status.String='Good'”。 可以是 null。 |
|
projectedProperties |
投影屬性是您想要投影的屬性陣列。 這些屬性必須出現在事件中;否則不會傳回它們。 |
|
searchSpan |
執行查詢的時間範圍。 不可以是 null。 |
|
take |
integer |
整個回應集中的屬性值數目上限,而不是每個頁面的屬性值數目上限。 未設定時,預設為10,000。 take 的最大值可以是 250,000。 |
timeSeriesId |
Time |
單一時間序列標識碼值,可唯一識別單一時間序列實例 (例如裝置) 。 請注意,如果在建立環境時將多個屬性指定為時間序列標識符,則可以複合單一時間序列標識符。 值的位置和類型必須符合環境所指定的時間序列標識元屬性,並由取得模型設定 API 傳回。 不可以是 null。 |
GetSeries
取得數列查詢。 允許從指定時間序列標識碼和搜尋範圍的事件中擷取計算變數值的時間序列。
名稱 | 類型 | Description |
---|---|---|
filter |
最上層篩選會限制要考慮計算的事件數目。 此篩選條件是 AND'ed,其中包含每個變數中的篩選。 範例:「$event。Status.String='Good'”。 選擇性。 |
|
inlineVariables |
object |
除了模型時間序列類型中已定義的變數之外,選擇性的內嵌變數。 當內嵌變數名稱與模型中的名稱相同時,內嵌變數定義優先。 可以是 null。 |
projectedVariables |
string[] |
需要投影在查詢結果中的選取變數。 當它是 Null 或未設定時,會傳回模型中 inlineVariables 和時間序列類型中的所有變數。 可以是 null。 |
searchSpan |
執行查詢的時間範圍。 不可以是 null。 |
|
take |
integer |
整個回應集中的屬性值數目上限,而不是每個頁面的屬性值數目上限。 未設定時,預設為10,000。 take 的最大值可以是 250,000。 |
timeSeriesId |
Time |
單一時間序列標識碼值,可唯一識別單一時間序列實例 (例如裝置) 。 請注意,如果在建立環境時將多個屬性指定為時間序列標識符,則可以複合單一時間序列標識符。 值的位置和類型必須符合環境所指定的時間序列標識元屬性,並由取得模型設定 API 傳回。 不可以是 null。 |
Interpolation
要對原始數據點執行的插補作業。 目前只允許取樣插補的時間序列。 允許的聚合函數 - 例如:左 ($value) 。 如果不需要套用插補點,則可以為 Null。
名稱 | 類型 | Description |
---|---|---|
boundary |
要用於插補的搜尋範圍左邊和右邊的時間範圍。 這在接近輸入搜尋範圍的開始或結尾處遺失數據點的情況下很有説明。 可以是 null。 |
|
kind |
插補技術的類型:「Linear」 或 「Step」。。 |
InterpolationKind
插補技術的類型:「Linear」 或 「Step」。。
名稱 | 類型 | Description |
---|---|---|
Linear |
string |
|
Step |
string |
NumericVariable
數值變數代表單一連續數值訊號,可使用插補重新建構。
名稱 | 類型 | Description |
---|---|---|
aggregation |
當種類為 「numeric」 時,匯總時間序列表達式用來表示必須在$value運算式上執行的匯總。 這需要指定$value,而且只能在聚合函數內使用$value。 例如,計算最小$value的匯總會寫入為:「最小 ($value) 」。 |
|
filter |
篩選限制要考慮計算之事件數目的事件。 範例:「$event。Status.String='Good'”。 選擇性。 |
|
interpolation |
要對原始數據點執行的插補作業。 目前只允許取樣插補的時間序列。 允許的聚合函數 - 例如:左 ($value) 。 如果不需要套用插補點,則可以為 Null。 |
|
kind |
string:
numeric |
允許的“kind” 值為 - “numeric” 或 “aggregate”。 雖然「數值」可讓您指定重建訊號的值,以及匯總它們的運算式,但「匯總」種類可讓您直接匯總事件屬性,而不需要指定值。 |
value |
值時間序列表達式是用來表示即將匯總或插補的訊號值。 例如,事件的溫度值會像這樣表示:「$event。Temperature.Double”。 |
PropertyTypes
屬性的類型。
名稱 | 類型 | Description |
---|---|---|
Bool |
string |
|
DateTime |
string |
|
Double |
string |
|
Long |
string |
|
String |
string |
|
TimeSpan |
string |
PropertyValues
對應至時間戳的單一屬性值。 可能包含 Null。 值的型別符合 屬性的類型。
名稱 | 類型 | Description |
---|---|---|
name |
string |
屬性的名稱。 |
type |
屬性的類型。 |
|
values |
Values[] |
對應至時間戳的單一屬性值。 可能包含 Null。 值的型別符合 屬性的類型。 |
QueryRequest
要求對事件執行時間序列查詢。 必須設定 「getEvents」、「getSeries」或「aggregateSeries」的其中一個。
名稱 | 類型 | Description |
---|---|---|
aggregateSeries |
匯總數列查詢。 允許從指定時間序列標識元和搜尋範圍的事件計算匯總的時間序列。 |
|
getEvents |
取得事件查詢。 允許擷取指定時間序列標識碼和搜尋範圍的原始事件。 |
|
getSeries |
取得數列查詢。 允許從指定時間序列標識碼和搜尋範圍的事件中擷取計算變數值的時間序列。 |
QueryResultPage
查詢結果的單一頁面。 如果查詢尚未完成,頁面將會設定接續令牌。 在此情況下,若要取得下一頁的結果,請使用接續令牌參數再次傳送相同的要求。 如果查詢已完成,接續令牌為 null。 當尚未計算任何查詢結果時,也可以取得只有接續令牌集的空白頁面。 如果分頁已完成 (接續令牌為 null) ,則如果沒有要傳回數據,時間戳和屬性可能會是空的。
名稱 | 類型 | Description |
---|---|---|
continuationToken |
string |
如果傳回,這表示目前的結果代表部分結果。 接續令牌允許取得下一頁的結果。 若要取得查詢結果的下一頁,請使用 「x-ms-continuation」 HTTP 標頭中的接續令牌參數傳送相同的要求。 |
progress |
number |
查詢的近似進度百分比。 它可以介於 0 到 100 之間。 當回應中的接續令牌為 null 時,進度預期為 100。 |
properties |
每個時間戳的時間序列屬性和值集合。 如果伺服器無法填入此要求中的頁面,則可為 null,如果接續令牌為 Null 時沒有其他物件則為空白。 |
|
timestamps |
string[] |
時間序列值的時間戳。 如果使用間隔的匯總,時間戳代表對應間隔的開頭。 如果擷取事件,時間戳是時間戳$ts事件的 屬性值。 如果伺服器無法填入此要求中的頁面,則可為 null,如果接續令牌為 Null 時沒有其他物件則為空白。 |
TimeSeriesAggregateCategory
類別變數中使用的類別。 類別是由 'label' 和指派此標籤的 'values' 所定義。
名稱 | 類型 | Description |
---|---|---|
label |
string |
用來建構輸出變數名稱的類別名稱。 |
values |
object[] |
類別目錄所對應的值清單。 可以是字串的唯一清單或long清單。 |
TimeSeriesDefaultCategory
表示預設類別。
名稱 | 類型 | Description |
---|---|---|
label |
string |
將指派給不符合 『categories』 中定義之任何值的預設類別名稱。 |
TsiError
API 錯誤的相關信息。
名稱 | 類型 | Description |
---|---|---|
error |
具有錯誤碼和訊息的特定 API 錯誤。 |
TsiErrorBody
具有錯誤碼和訊息的特定 API 錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
與語言無關、人類可讀取的字串,可定義服務特定的錯誤碼。 此程式代碼可作為回應中指定的 HTTP 錯誤碼更明確的指標。 可用來以程式設計方式處理特定錯誤案例。 |
details |
包含其他錯誤資訊。 可能是 Null。 |
|
innerError |
包含更明確的錯誤,可縮小原因範圍。 可能是 Null。 |
|
message |
string |
人類可讀、與語言無關的錯誤表示法。 它是開發人員的協助,不適合公開給終端使用者。 |
target |
string |
例如,特定錯誤的目標 (,錯誤) 的屬性名稱。 可能是 Null。 |
TsiErrorDetails
其他錯誤資訊。
名稱 | 類型 | Description |
---|---|---|
code |
string |
與語言無關、人類可讀取的字串,可定義服務特定的錯誤碼。 此程式代碼可作為回應中指定的 HTTP 錯誤碼更明確的指標。 可用來以程式設計方式處理特定錯誤案例。 |
message |
string |
人類可讀、與語言無關的錯誤表示法。 它是開發人員的協助,不適合公開給終端使用者。 |
Tsx
時間序列表達式 (TSX) 寫入為單一字串。 範例:「$event。Status.String='Good',“avg ($event。溫度) 」。 請參閱有關如何撰寫時間序列表達式的檔。
名稱 | 類型 | Description |
---|---|---|
tsx |
string |
時間序列表達式 (TSX) 寫入為單一字串。 範例:「$event。Status.String='Good'“, ”avg ($event.溫度) “。 請參閱有關如何撰寫時間序列表達式的檔。 |