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 パラメーター

名前 / 必須 説明
environmentFqdn
path True

string

10000000-0000-0000-0000-100000000109.env.timeseries.azure.com など、環境ごとの FQDN。 このドメイン名は、Get Environments API、Azure portal、または Azure Resource Managerの応答から取得できます。

api-version
query True

string

クライアント要求で使用される API のバージョン。 現在サポートされているバージョンは "2020-07-31" です。

storeType
query

string

ウォーム ストアが有効になっている環境の場合、クエリは 'WarmStore' または 'ColdStore' で実行できます。 クエリ内のこのパラメーターは、クエリを実行する必要があるストアを定義します。 定義されていない場合は、コールドストアでクエリが実行されます。

要求ヘッダー

名前 必須 説明
x-ms-continuation

string

ページ分割をサポートする呼び出しで結果の次のページを取得するための、結果の前のページからの継続トークン。 最初のページの結果を取得するには、null 継続トークンをパラメーター値として指定します。 すべての結果が返され、結果の次のページがない場合、返される継続トークンは null です。

x-ms-client-request-id

string

オプションのクライアント要求 ID。 サービスでは、この値が記録されます。 サービスがサービス間で操作をトレースできるようにし、顧客が特定の要求に関してサポートに連絡できるようにします。

x-ms-client-session-id

string

オプションのクライアント セッション ID。 サービスでは、この値が記録されます。 サービス間で関連する操作のグループを追跡し、顧客が特定の要求グループに関してサポートに連絡できるようにします。

要求本文

名前 説明
aggregateSeries

AggregateSeries

集計系列クエリ。 特定の時系列 ID と検索スパンのイベントから集計された時系列を計算できます。

getEvents

GetEvents

イベントの取得クエリ。 特定のタイム シリーズ ID と検索スパンの生イベントを取得できます。

getSeries

GetSeries

系列クエリを取得します。 特定の時系列 ID と検索スパンのイベントから計算された変数値の時系列を取得できます。

応答

名前 説明
200 OK

QueryResultPage

クエリが成功しました。

Headers

x-ms-request-id: string

Other Status Codes

TsiError

予期しないエラー。

Headers

x-ms-request-id: string

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

ColdStoreQueryAggregateSeriesPage1
ColdStoreQueryAggregateSeriesPage2
ColdStoreQueryGetEventsPage1
ColdStoreQueryGetEventsPage2
ColdStoreQueryGetEventsPage3
ColdStoreQueryGetEventsPage4
ColdStoreQueryGetSeriesPage1
ColdStoreQueryGetSeriesPage2
ColdStoreQueryGetSeriesPage3
QueryAggregateSeriesPage1
QueryAggregateSeriesPage2
QueryAggregateSeriesWithCategoricalInterpolatedVariable
QueryAggregateSeriesWithCategoricalVariable
QueryAggregateSeriesWithSampleInterpolation
QueryGetEventsPage1
QueryGetEventsPage2
QueryGetEventsPage3
QueryGetEventsPage4
QueryGetEventsWithTakePage1
QueryGetEventsWithTakePage2
QueryGetSeriesPage1
QueryGetSeriesPage2
QueryGetSeriesPage3
QueryGetSeriesWithTakePage1
QueryGetSeriesWithTakePage2
WarmStoreQueryAggregateSeriesPage
WarmStoreQueryGetEventsPage1
WarmStoreQueryGetEventsPage2
WarmStoreQueryGetEventsPage3
WarmStoreQueryGetEventsPage4
WarmStoreQueryGetSeriesPage1
WarmStoreQueryGetSeriesPage2
WarmStoreQueryGetSeriesPage3

ColdStoreQueryAggregateSeriesPage1

Sample Request

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"
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

ColdStoreQueryAggregateSeriesPage2

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

ColdStoreQueryGetEventsPage2

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "timestamps": [],
  "properties": [],
  "progress": 100
}

ColdStoreQueryGetSeriesPage1

Sample Request

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"
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

ColdStoreQueryGetSeriesPage2

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "timestamps": [
    "2016-08-01T00:00:21Z"
  ],
  "properties": [
    {
      "name": "temperatures",
      "type": "Double",
      "values": [
        67.825
      ]
    }
  ],
  "progress": 100
}

QueryAggregateSeriesPage1

Sample Request

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"
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

QueryAggregateSeriesPage2

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

QueryGetEventsPage2

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "timestamps": [],
  "properties": [],
  "progress": 100
}

QueryGetEventsWithTakePage1

Sample Request

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
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

QueryGetEventsWithTakePage2

Sample Request

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
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

QueryGetSeriesPage2

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "timestamps": [
    "2016-08-01T00:00:21Z"
  ],
  "properties": [
    {
      "name": "temperatures",
      "type": "Double",
      "values": [
        67.825
      ]
    }
  ],
  "progress": 100
}

QueryGetSeriesWithTakePage1

Sample Request

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
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

QueryGetSeriesWithTakePage2

Sample Request

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
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

WarmStoreQueryGetEventsPage2

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
      }
    ]
  }
}

Sample Response

{
  "timestamps": [],
  "properties": [],
  "progress": 100
}

WarmStoreQueryGetSeriesPage1

Sample Request

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"
    ]
  }
}

Sample Response

{
  "progress": 50,
  "continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}

WarmStoreQueryGetSeriesPage2

Sample Request

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"
    ]
  }
}

Sample Response

{
  "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

Sample Request

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"
    ]
  }
}

Sample Response

{
  "timestamps": [
    "2016-08-01T00:00:21Z"
  ],
  "properties": [
    {
      "name": "temperatures",
      "type": "Double",
      "values": [
        67.825
      ]
    }
  ],
  "progress": 100
}

定義

名前 説明
AggregateSeries

集計系列クエリ。 特定の時系列 ID と検索スパンのイベントから集計された時系列を計算できます。

AggregateVariable

集計変数は、集計計算を表します。 集計変数は補間をサポートしていません。

Boundary

補間に使用する検索範囲の左右の時間範囲。 これは、入力検索範囲の開始または終了の近くにデータ ポイントが欠落しているシナリオで役立ちます。 null を使用できます。

CategoricalVariable

カテゴリ変数は、定義された値の限られたセットの出現回数または発生期間に基づいて分析する必要があるシグナルを表します。

DateTimeRange

時間の範囲。 null または負の値にすることはできません。

EventProperty

格納または計算されるイベントのプロパティ。 プロパティは、名前と型の両方で識別されます。 異なるイベントは、同じ名前のプロパティを持つことができますが、種類は異なります。

GetEvents

イベントの取得クエリ。 特定のタイム シリーズ ID と検索スパンの生イベントを取得できます。

GetSeries

系列クエリを取得します。 特定の時系列 ID と検索スパンのイベントから計算された変数値の時系列を取得できます。

Interpolation

生データ ポイントに対して実行される補間操作。 現時点では、補間された時系列のサンプリングのみが許可されています。 許可される集計関数 - 例: left($value)。 補間を適用する必要がない場合は null を指定できます。

InterpolationKind

補間手法の種類: "Linear" または "Step"。

NumericVariable

数値変数は、補間を使用して再構築できる 1 つの連続する数値信号を表します。

PropertyTypes

プロパティの型。

PropertyValues

タイムスタンプに対応する 1 つのプロパティの値。 null を含む場合があります。 値の型は、プロパティの型と一致します。

QueryRequest

イベントに対する時系列クエリの実行を要求します。 "getEvents"、"getSeries"、または "aggregateSeries" のいずれかを設定する必要があります。

QueryResultPage

クエリ結果の 1 ページ。 クエリがまだ完了していない場合、ページには継続トークンが設定されます。 この場合、結果の次のページを取得するには、継続トークン パラメーターを使用して同じ要求をもう一度送信します。 クエリが完了した場合、継続トークンは null です。 クエリ結果がまだ計算されていない場合は、継続トークンのみが設定された空のページを取得することもできます。 ページングが完了した場合 (継続トークンが null の場合)、返すデータがない場合は、タイムスタンプとプロパティが空になる可能性があります。

TimeSeriesAggregateCategory

カテゴリ変数で使用されるカテゴリ。 カテゴリは、このラベルが割り当てられている 'label' と 'values' によって定義されます。

TimeSeriesDefaultCategory

既定のカテゴリを表します。

TsiError

API エラーに関する情報。

TsiErrorBody

エラー コードとメッセージを含む特定の API エラー。

TsiErrorDetails

その他のエラー情報。

Tsx

1 つの文字列として書き込まれた時系列式 (TSX)。 例: "$event。Status.String='Good'", "avg($event.温度)"。 時系列式を記述する方法については、ドキュメントを参照してください。

AggregateSeries

集計系列クエリ。 特定の時系列 ID と検索スパンのイベントから集計された時系列を計算できます。

名前 説明
filter

Tsx

計算対象と見なされるイベントの数を制限するイベントに対する最上位フィルター。 このフィルターは、各変数のフィルターと共に AND に設定されています。 例: "$event。Status.String='Good'" 省略可能。

inlineVariables

object

これにより、ユーザーは必要に応じて、モデルで既に定義されている変数とは別にインライン変数を定義できます。 インライン変数名の名前がモデルと同じ場合は、インライン変数定義が優先されます。 null を使用できます。

interval

string

間隔のサイズは、ISO-8601 の期間形式で指定されます。 すべての間隔は同じサイズです。 1 か月は常に 30 日に変換され、1 年は常に 365 日です。 例: 1 分は "PT1M"、1 ミリ秒は "PT0.001S" です。 詳細については、https://www.w3.org/TR/xmlschema-2/#duration を参照してください。

projectedVariables

string[]

これにより、ユーザーは必要に応じて、投影する必要がある変数を選択できます。 null または設定されていない場合は、inlineVariables と model のすべての変数が返されます。 null を使用できます。

searchSpan

DateTimeRange

クエリが実行される時間の範囲。 null にすることはできません。

timeSeriesId

TimeSeriesId[]

1 つの時系列インスタンス (デバイスなど) を一意に識別する 1 つの時系列 ID 値。 環境作成時に複数のプロパティが Time Series ID として指定されている場合、1 つの時系列 ID を複合できることに注意してください。 値の位置と型は、環境で指定され、Get Model Setting API によって返される Time Series ID プロパティと一致する必要があります。 null にすることはできません。

AggregateVariable

集計変数は、集計計算を表します。 集計変数は補間をサポートしていません。

名前 説明
aggregation

Tsx

kind が "aggregate" の場合の集計時系列式は、"$event" などのイベント プロパティを使用して直接実行する必要がある集計を表すために使用されます。温度"。 たとえば、気温の変化範囲を計算するための集計は、"max($event。Temperature)-min($event.温度)"。

filter

Tsx

計算対象と見なされるイベントの数を制限するイベントをフィルター処理します。 例: "$event。Status.String='Good'" 省略可能。

kind string:

aggregate

使用できる "kind" 値は、"numeric" または "aggregate" です。 "数値" を使用すると、再構築されたシグナルの値とそれらを集計する式を指定できますが、"集計" の種類を使用すると、値を指定せずにイベント プロパティを直接集計できます。

Boundary

補間に使用する検索範囲の左右の時間範囲。 これは、入力検索範囲の開始または終了の近くにデータ ポイントが欠落しているシナリオで役立ちます。 null を使用できます。

名前 説明
span

string

CategoricalVariable

カテゴリ変数は、定義された値の限られたセットの出現回数または発生期間に基づいて分析する必要があるシグナルを表します。

名前 説明
categories

TimeSeriesAggregateCategory[]

カテゴリ変数で使用されるカテゴリ。 カテゴリは、このラベルが割り当てられている 'label' と 'values' によって定義されます。

defaultCategory

TimeSeriesDefaultCategory

既定のカテゴリを表します。

filter

Tsx

計算対象と見なされるイベントの数を制限するイベントをフィルター処理します。 例: "$event。Status.String='Good'" 省略可能。

interpolation

Interpolation

カテゴリ変数では、"step" 補間のみがサポートされます。

kind string:

categorical

使用できる "kind" 値は、"numeric" または "aggregate" です。 "数値" を使用すると、再構築されたシグナルの値とそれらを集計する式を指定できますが、"集計" の種類を使用すると、値を指定せずにイベント プロパティを直接集計できます。

value

Tsx

値の時系列式は、分類されるシグナルの値を表すために使用されます。 カテゴリ変数の 'String' 型または 'Long' 型にのみ評価できます。

DateTimeRange

時間の範囲。 null または負の値にすることはできません。

名前 説明
from

string

時間範囲の開始タイムスタンプ。 時系列クエリ要求で使用する場合、開始タイムスタンプは包括的です。 このタイムスタンプを持つイベントが含まれます。

to

string

時間範囲の終了タイムスタンプ。 終了タイムスタンプは、時系列クエリ要求で使用される場合は排他的です。 このタイムスタンプに一致するイベントは除外されます。 Get Availability によって返された場合、終了タイムスタンプは包括的であることに注意してください (つまり、この正確な "to" タイムスタンプを持つイベントがあることを意味します)。

EventProperty

格納または計算されるイベントのプロパティ。 プロパティは、名前と型の両方で識別されます。 異なるイベントは、同じ名前のプロパティを持つことができますが、種類は異なります。

名前 説明
name

string

プロパティの名前。

type

PropertyTypes

プロパティの型。

GetEvents

イベントの取得クエリ。 特定のタイム シリーズ ID と検索スパンの生イベントを取得できます。

名前 説明
filter

Tsx

クエリ内のすべての変数に適用されるクエリのオプションの最上位フィルター。 例: "$event。Status.String='Good'" null を使用できます。

projectedProperties

EventProperty[]

投影プロパティは、投影するプロパティの配列です。 これらのプロパティは、イベントに表示する必要があります。それ以外の場合は、返されません。

searchSpan

DateTimeRange

クエリが実行される時間の範囲。 null にすることはできません。

take

integer

1 ページあたりのプロパティ値の最大数ではなく、応答セット全体のプロパティ値の最大数。 既定値は、設定されていない場合は 10,000 です。 take の最大値は 250,000 です。

timeSeriesId

TimeSeriesId[]

1 つの時系列インスタンス (デバイスなど) を一意に識別する 1 つの時系列 ID 値。 環境作成時に複数のプロパティが Time Series ID として指定されている場合、1 つの時系列 ID を複合できることに注意してください。 値の位置と型は、環境で指定され、Get Model Setting API によって返される Time Series ID プロパティと一致する必要があります。 null にすることはできません。

GetSeries

系列クエリを取得します。 特定の時系列 ID と検索スパンのイベントから計算された変数値の時系列を取得できます。

名前 説明
filter

Tsx

計算対象と見なされるイベントの数を制限するイベントに対する最上位フィルター。 このフィルターは、各変数のフィルターと共に AND に設定されています。 例: "$event。Status.String='Good'" 省略可能。

inlineVariables

object

モデルの時系列型で既に定義されている変数とは別に、オプションのインライン変数。 インライン変数名がモデルと同じ名前の場合、インライン変数の定義が優先されます。 null を使用できます。

projectedVariables

string[]

クエリ結果に投影する必要がある選択された変数。 null または設定されていない場合、モデル内の inlineVariables および時系列型のすべての変数が返されます。 null を使用できます。

searchSpan

DateTimeRange

クエリが実行される時間の範囲。 null にすることはできません。

take

integer

1 ページあたりのプロパティ値の最大数ではなく、応答セット全体のプロパティ値の最大数。 既定値は、設定されていない場合は 10,000 です。 take の最大値は 250,000 です。

timeSeriesId

TimeSeriesId[]

1 つの時系列インスタンス (デバイスなど) を一意に識別する 1 つの時系列 ID 値。 環境作成時に複数のプロパティが Time Series ID として指定されている場合、1 つの時系列 ID を複合できることに注意してください。 値の位置と型は、環境で指定され、Get Model Setting API によって返される Time Series ID プロパティと一致する必要があります。 null にすることはできません。

Interpolation

生データ ポイントに対して実行される補間操作。 現時点では、補間された時系列のサンプリングのみが許可されています。 許可される集計関数 - 例: left($value)。 補間を適用する必要がない場合は null を指定できます。

名前 説明
boundary

Boundary

補間に使用する検索範囲の左右の時間範囲。 これは、入力検索範囲の開始または終了の近くにデータ ポイントが欠落しているシナリオで役立ちます。 null を使用できます。

kind

InterpolationKind

補間手法の種類: "Linear" または "Step"。

InterpolationKind

補間手法の種類: "Linear" または "Step"。

名前 説明
Linear

string

Step

string

NumericVariable

数値変数は、補間を使用して再構築できる 1 つの連続する数値信号を表します。

名前 説明
aggregation

Tsx

kind が "numeric" の場合の集計時系列式は、$value式で実行する必要がある集計を表すために使用されます。 これには$valueを指定する必要があり、集計関数内でのみ$valueを使用できます。 たとえば、$valueの最小値を計算するための集計は、"min($value)" と書かれています。

filter

Tsx

計算対象と見なされるイベントの数を制限するイベントをフィルター処理します。 例: "$event。Status.String='Good'" 省略可能。

interpolation

Interpolation

生データ ポイントに対して実行される補間操作。 現時点では、補間された時系列のサンプリングのみが許可されています。 許可される集計関数 - 例: left($value)。 補間を適用する必要がない場合は null を指定できます。

kind string:

numeric

使用できる "kind" 値は、"numeric" または "aggregate" です。 "数値" を使用すると、再構築されたシグナルの値とそれらを集計する式を指定できますが、"集計" の種類を使用すると、値を指定せずにイベント プロパティを直接集計できます。

value

Tsx

値の時系列式は、集計または補間されるシグナルの値を表すために使用されます。 たとえば、イベントの温度値は次のように表されます:"$event。Temperature.Double"

PropertyTypes

プロパティの型。

名前 説明
Bool

string

DateTime

string

Double

string

Long

string

String

string

TimeSpan

string

PropertyValues

タイムスタンプに対応する 1 つのプロパティの値。 null を含む場合があります。 値の型は、プロパティの型と一致します。

名前 説明
name

string

プロパティの名前。

type

PropertyTypes

プロパティの型。

values

Values[]

タイムスタンプに対応する 1 つのプロパティの値。 null を含む場合があります。 値の型は、プロパティの型と一致します。

QueryRequest

イベントに対する時系列クエリの実行を要求します。 "getEvents"、"getSeries"、または "aggregateSeries" のいずれかを設定する必要があります。

名前 説明
aggregateSeries

AggregateSeries

集計系列クエリ。 特定の時系列 ID と検索スパンのイベントから集計された時系列を計算できます。

getEvents

GetEvents

イベントの取得クエリ。 特定のタイム シリーズ ID と検索スパンの生イベントを取得できます。

getSeries

GetSeries

系列クエリを取得します。 特定の時系列 ID と検索スパンのイベントから計算された変数値の時系列を取得できます。

QueryResultPage

クエリ結果の 1 ページ。 クエリがまだ完了していない場合、ページには継続トークンが設定されます。 この場合、結果の次のページを取得するには、継続トークン パラメーターを使用して同じ要求をもう一度送信します。 クエリが完了した場合、継続トークンは null です。 クエリ結果がまだ計算されていない場合は、継続トークンのみが設定された空のページを取得することもできます。 ページングが完了した場合 (継続トークンが null の場合)、返すデータがない場合は、タイムスタンプとプロパティが空になる可能性があります。

名前 説明
continuationToken

string

返された場合、現在の結果は部分的な結果を表します。 継続トークンを使用すると、結果の次のページを取得できます。 クエリ結果の次のページを取得するには、"x-ms-continuation" HTTP ヘッダーに継続トークン パラメーターを指定して同じ要求を送信します。

progress

number

クエリのおおよその進行状況 (パーセンテージ)。 0 ~ 100 の値を指定できます。 応答の継続トークンが null の場合、進行状況は 100 であると予想されます。

properties

PropertyValues[]

各タイムスタンプの時系列プロパティと値のコレクション。 サーバーがこの要求のページに入力できなかった場合は null、継続トークンが null の場合はオブジェクトが存在しない場合は空にすることができます。

timestamps

string[]

時系列の値のタイムスタンプ。 間隔にわたる集計が使用される場合、タイムスタンプは対応する間隔の開始を表します。 イベントが取得された場合、タイムスタンプはイベントのタイムスタンプ $ts プロパティの値です。 サーバーがこの要求のページに入力できなかった場合は null、継続トークンが null の場合はオブジェクトが存在しない場合は空にすることができます。

TimeSeriesAggregateCategory

カテゴリ変数で使用されるカテゴリ。 カテゴリは、このラベルが割り当てられている 'label' と 'values' によって定義されます。

名前 説明
label

string

出力変数名の構築に使用されるカテゴリの名前。

values

object[]

カテゴリがマップされる値の一覧。 文字列の一意のリストまたは long のリストを指定できます。

TimeSeriesDefaultCategory

既定のカテゴリを表します。

名前 説明
label

string

'categories' で定義されている値と一致しない値に割り当てられる既定のカテゴリの名前。

TsiError

API エラーに関する情報。

名前 説明
error

TsiErrorBody

エラー コードとメッセージを含む特定の API エラー。

TsiErrorBody

エラー コードとメッセージを含む特定の API エラー。

名前 説明
code

string

サービス固有のエラー コードを定義する、言語に依存しない人間が判読できる文字列。 このコードは、応答で指定された HTTP エラー コードのより具体的なインジケーターとして機能します。 特定のエラー ケースをプログラムで処理するために使用できます。

details

TsiErrorDetails[]

追加のエラー情報が含まれています。 null も指定できます。

innerError

TsiErrorBody

原因を絞り込む、より具体的なエラーが含まれています。 null も指定できます。

message

string

エラーの人間が判読できる言語に依存しない表現。 これは開発者の支援を目的としており、エンド ユーザーへの公開には適していません。

target

string

特定のエラーのターゲット (たとえば、エラーのプロパティの名前)。 null も指定できます。

TsiErrorDetails

その他のエラー情報。

名前 説明
code

string

サービス固有のエラー コードを定義する、言語に依存しない人間が判読できる文字列。 このコードは、応答で指定された HTTP エラー コードのより具体的なインジケーターとして機能します。 特定のエラー ケースをプログラムで処理するために使用できます。

message

string

エラーの人間が判読できる言語に依存しない表現。 これは開発者の支援を目的としており、エンド ユーザーへの公開には適していません。

Tsx

1 つの文字列として書き込まれた時系列式 (TSX)。 例: "$event。Status.String='Good'", "avg($event.温度)"。 時系列式を記述する方法については、ドキュメントを参照してください。

名前 説明
tsx

string

1 つの文字列として書き込まれた時系列式 (TSX)。 例: "$event。Status.String='Good'", "avg($event.温度)"。 時系列式を記述する方法については、ドキュメントを参照してください。