Query - Execute
Esegue una query time series in pagine di risultati: ottenere eventi, ottenere serie get o serie di aggregazioni.
POST https://{environmentFqdn}/timeseries/query?api-version=2020-07-31
POST https://{environmentFqdn}/timeseries/query?api-version=2020-07-31&storeType={storeType}
Parametri dell'URI
Nome | In | Necessario | Tipo | Descrizione |
---|---|---|---|---|
environment
|
path | True |
string |
FQDN per ambiente, ad esempio 10000000-0000-0000-0000-100000000109.env.timeseries.azure.com. È possibile ottenere questo nome di dominio dalla risposta dell'API Recupera ambienti, del portale di Azure o di Azure Resource Manager. |
api-version
|
query | True |
string |
Versione dell'API da usare con la richiesta client. La versione attualmente supportata è "2020-07-31". |
store
|
query |
string |
Per gli ambienti con archivio ad accesso frequente abilitato, la query può essere eseguita in 'WarmStore' o 'ColdStore'. Questo parametro nella query definisce l'archivio in cui deve essere eseguita la query. Se non definito, la query verrà eseguita nell'archivio ad accesso sporadico. |
Intestazione della richiesta
Nome | Necessario | Tipo | Descrizione |
---|---|---|---|
x-ms-continuation |
string |
Token di continuazione dalla pagina precedente dei risultati per recuperare la pagina successiva dei risultati nelle chiamate che supportano l'impaginazione. Per ottenere i risultati della prima pagina, specificare il token di continuazione Null come valore del parametro. Il token di continuazione restituito è Null se tutti i risultati sono stati restituiti e non è presente alcuna pagina successiva di risultati. |
|
x-ms-client-request-id |
string |
ID richiesta client facoltativo. Il servizio registra questo valore. Consente al servizio di tenere traccia dell'operazione tra i servizi e consente al cliente di contattare il supporto tecnico relativo a una determinata richiesta. |
|
x-ms-client-session-id |
string |
ID sessione client facoltativo. Il servizio registra questo valore. Consente al servizio di tracciare un gruppo di operazioni correlate tra servizi e consente al cliente di contattare il supporto tecnico relativo a un determinato gruppo di richieste. |
Corpo della richiesta
Nome | Tipo | Descrizione |
---|---|---|
aggregateSeries |
Query aggregate series. Consente di calcolare una serie temporale aggregata dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
|
getEvents |
Query Recupera eventi. Consente di recuperare eventi non elaborati per un determinato ID serie temporale e intervallo di ricerca. |
|
getSeries |
Ottenere una query serie. Consente di recuperare una serie temporale di valori di variabili calcolate dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
Risposte
Nome | Tipo | Descrizione |
---|---|---|
200 OK |
Query riuscita. Intestazioni x-ms-request-id: string |
|
Other Status Codes |
Errore imprevisto. Intestazioni x-ms-request-id: string |
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
Nome | Descrizione |
---|---|
user_impersonation | rappresentare l'account utente |
Esempio
ColdStoreQueryAggregateSeriesPage1
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryAggregateSeriesPage2
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetEventsPage2
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"timestamps": [],
"properties": [],
"progress": 100
}
ColdStoreQueryGetSeriesPage1
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
ColdStoreQueryGetSeriesPage2
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
QueryAggregateSeriesPage1
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryAggregateSeriesPage2
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetEventsPage2
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"timestamps": [],
"properties": [],
"progress": 100
}
QueryGetEventsWithTakePage1
Esempio di richiesta
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
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetEventsWithTakePage2
Esempio di richiesta
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
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetSeriesPage2
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
QueryGetSeriesWithTakePage1
Esempio di richiesta
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
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
QueryGetSeriesWithTakePage2
Esempio di richiesta
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
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetEventsPage2
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
]
}
}
Risposta di esempio
{
"timestamps": [],
"properties": [],
"progress": 100
}
WarmStoreQueryGetSeriesPage1
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"progress": 50,
"continuationToken": "aXsic2tpcCI6MTAwMCwidGFrZSI6MTAwMH0="
}
WarmStoreQueryGetSeriesPage2
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
]
}
}
Risposta di esempio
{
"timestamps": [
"2016-08-01T00:00:21Z"
],
"properties": [
{
"name": "temperatures",
"type": "Double",
"values": [
67.825
]
}
],
"progress": 100
}
Definizioni
Nome | Descrizione |
---|---|
Aggregate |
Query aggregate series. Consente di calcolare una serie temporale aggregata dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
Aggregate |
La variabile di aggregazione rappresenta qualsiasi calcolo di aggregazione. Le variabili di aggregazione non supportano l'interpolazione. |
Boundary |
Intervallo di tempo a sinistra e a destra dell'intervallo di ricerca da usare per l'interpolazione. Ciò è utile negli scenari in cui i punti dati mancano vicino all'inizio o alla fine dell'intervallo di ricerca di input. Può essere Null. |
Categorical |
La variabile categorica rappresenta il segnale che deve essere analizzato in base al conteggio o alla durata dell'occorrenza di un set limitato di valori definiti. |
Date |
Intervallo di tempo. Non può essere null o negativo. |
Event |
Proprietà di un evento archiviato o calcolato. Le proprietà sono identificate sia dal nome che dal tipo. Eventi diversi possono avere proprietà con lo stesso nome, ma un tipo diverso. |
Get |
Query Recupera eventi. Consente di recuperare eventi non elaborati per un determinato ID serie temporale e intervallo di ricerca. |
Get |
Ottenere una query serie. Consente di recuperare una serie temporale di valori di variabili calcolate dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
Interpolation |
Operazione di interpolazione da eseguire sui punti dati non elaborati. Attualmente è consentito solo il campionamento delle serie temporali interpolate. Funzione di aggregazione consentita, ad esempio left($value). Può essere Null se non è necessario applicare alcuna interpolazione. |
Interpolation |
Tipo di tecnica di interpolazione: "Lineare" o "Passaggio". |
Numeric |
La variabile numerica rappresenta un singolo segnale numerico continuo che può essere ricostruito usando l'interpolazione. |
Property |
Tipo della proprietà. |
Property |
Valori di una singola proprietà corrispondente ai timestamp. Può contenere valori Null. Il tipo di valori corrisponde al tipo di proprietà. |
Query |
Richiedere di eseguire una query di serie temporali sugli eventi. È necessario impostare esattamente uno dei "getEvents", "getSeries" o "aggregateSeries". |
Query |
Singola pagina dei risultati della query. Se la query non è ancora stata completata, verrà impostato un token di continuazione in una pagina. In questo caso, per ottenere la pagina successiva dei risultati, inviare di nuovo la stessa richiesta con il parametro del token di continuazione. Se la query è stata completata, il token di continuazione è Null. È anche possibile ottenere una pagina vuota con solo il token di continuazione impostato quando non sono stati ancora calcolati risultati di query. Se il paging è stato completato (il token di continuazione è Null), i timestamp e le proprietà possono essere vuoti se non sono presenti dati da restituire. |
Time |
Categoria usata nelle variabili categoriche. Una categoria è definita da 'label' e 'values' a cui è assegnata questa etichetta. |
Time |
Rappresenta la categoria predefinita. |
Tsi |
Informazioni su un errore dell'API. |
Tsi |
Errore dell'API specifico con un codice di errore e un messaggio. |
Tsi |
Informazioni aggiuntive sull'errore. |
Tsx |
Espressione time series (TSX) scritta come singola stringa. Esempi: "$event. Status.String='Good'", "avg($event. Temperatura)". Vedere la documentazione su come scrivere espressioni time series. |
AggregateSeries
Query aggregate series. Consente di calcolare una serie temporale aggregata dagli eventi per un determinato ID serie temporale e intervallo di ricerca.
Nome | Tipo | Descrizione |
---|---|---|
filter |
Filtro di primo livello sugli eventi che limitano il numero di eventi considerati per il calcolo. Questo filtro è AND'ed con filtro in ogni variabile. Esempio: "$event. Status.String='Good'". Opzionale. |
|
inlineVariables |
object |
Ciò consente all'utente di definire facoltativamente variabili inline a parte quelle già definite nel modello. Quando i nomi delle variabili inline hanno lo stesso nome del modello, la definizione della variabile inline ha la precedenza. Può essere Null. |
interval |
string (duration) |
Le dimensioni dell'intervallo sono specificate nel formato di durata ISO-8601. Tutti gli intervalli hanno le stesse dimensioni. Un mese viene sempre convertito in 30 giorni e un anno è sempre 365 giorni. Esempi: 1 minuto è "PT1M", 1 millisecondo è "PT0.001S". Per altre informazioni, vedere https://www.w3.org/TR/xmlschema-2/#duration |
projectedVariables |
string[] |
Ciò consente all'utente di selezionare facoltativamente le variabili che devono essere proiettate. Quando è null o non è impostato, vengono restituite tutte le variabili di inlineVariables e il modello. Può essere Null. |
searchSpan |
Intervallo di tempo in cui viene eseguita la query. Non può essere Null. |
|
timeSeriesId |
Time |
Valore ID serie temporale singolo che identifica in modo univoco una singola istanza della serie temporale, ad esempio un dispositivo. Si noti che un singolo ID serie temporale può essere composito se più proprietà vengono specificate come ID serie temporale in fase di creazione dell'ambiente. La posizione e il tipo di valori devono corrispondere alle proprietà DELL'ID serie temporale specificate nell'ambiente e restituite dall'API Get Model Setting. Non può essere Null. |
AggregateVariable
La variabile di aggregazione rappresenta qualsiasi calcolo di aggregazione. Le variabili di aggregazione non supportano l'interpolazione.
Nome | Tipo | Descrizione |
---|---|---|
aggregation |
L'espressione della serie temporale di aggregazione quando il tipo è "aggregato" viene usato per rappresentare l'aggregazione che deve essere eseguita direttamente usando proprietà evento come "$event. Temperatura". Ad esempio, l'aggregazione per il calcolo dell'intervallo di variazioni di temperatura può essere scritta come: "max($event. Temperature)-min($event. Temperatura)". |
|
filter |
Filtrare gli eventi che limitano il numero di eventi da considerare per il calcolo. Esempio: "$event. Status.String='Good'". Opzionale. |
|
kind |
string:
aggregate |
I valori "kind" consentiti sono : "numeric" o "aggregate". Anche se "numerico" consente di specificare il valore del segnale ricostruito e l'espressione per aggregarle, il tipo "aggregate" consente di aggregare direttamente le proprietà dell'evento senza specificare il valore. |
Boundary
Intervallo di tempo a sinistra e a destra dell'intervallo di ricerca da usare per l'interpolazione. Ciò è utile negli scenari in cui i punti dati mancano vicino all'inizio o alla fine dell'intervallo di ricerca di input. Può essere Null.
Nome | Tipo | Descrizione |
---|---|---|
span |
string (duration) |
CategoricalVariable
La variabile categorica rappresenta il segnale che deve essere analizzato in base al conteggio o alla durata dell'occorrenza di un set limitato di valori definiti.
Nome | Tipo | Descrizione |
---|---|---|
categories |
Categoria usata nelle variabili categoriche. Una categoria è definita da 'label' e 'values' a cui è assegnata questa etichetta. |
|
defaultCategory |
Rappresenta la categoria predefinita. |
|
filter |
Filtrare gli eventi che limitano il numero di eventi da considerare per il calcolo. Esempio: "$event. Status.String='Good'". Opzionale. |
|
interpolation |
La variabile categorica supporta solo l'interpolazione 'step'. |
|
kind |
string:
categorical |
I valori "kind" consentiti sono : "numeric" o "aggregate". Anche se "numerico" consente di specificare il valore del segnale ricostruito e l'espressione per aggregarle, il tipo "aggregate" consente di aggregare direttamente le proprietà dell'evento senza specificare il valore. |
value |
L'espressione time series value viene usata per rappresentare il valore del segnale che verrà categorizzato. Può restituire solo il tipo "String" o "Long" per le variabili categoriche. |
DateTimeRange
Intervallo di tempo. Non può essere null o negativo.
Nome | Tipo | Descrizione |
---|---|---|
from |
string (date-time) |
Timestamp di inizio dell'intervallo di tempo. Il timestamp di avvio è inclusivo quando viene usato nelle richieste di query di serie temporali. Sono inclusi gli eventi con questo timestamp. |
to |
string (date-time) |
Timestamp di fine dell'intervallo di tempo. Il timestamp di fine è esclusivo quando viene usato nelle richieste di query di serie temporali. Gli eventi che corrispondono a questo timestamp vengono esclusi. Si noti che il timestamp di fine è inclusivo quando viene restituito da Get Availability (ovvero è presente un evento con questo timestamp esatto "to"). |
EventProperty
Proprietà di un evento archiviato o calcolato. Le proprietà sono identificate sia dal nome che dal tipo. Eventi diversi possono avere proprietà con lo stesso nome, ma un tipo diverso.
Nome | Tipo | Descrizione |
---|---|---|
name |
string |
Nome della proprietà. |
type |
Tipo della proprietà. |
GetEvents
Query Recupera eventi. Consente di recuperare eventi non elaborati per un determinato ID serie temporale e intervallo di ricerca.
Nome | Tipo | Descrizione |
---|---|---|
filter |
Filtro di primo livello facoltativo per la query che verrà applicata a tutte le variabili nella query. Esempio: "$event. Status.String='Good'". Può essere Null. |
|
projectedProperties |
Le proprietà proiettate sono una matrice di proprietà che si desidera proiettare. Queste proprietà devono essere visualizzate negli eventi; in caso contrario, non vengono restituiti. |
|
searchSpan |
Intervallo di tempo in cui viene eseguita la query. Non può essere Null. |
|
take |
integer (int32) |
Numero massimo di valori di proprietà nell'intero set di risposte, non il numero massimo di valori delle proprietà per pagina. Il valore predefinito è 10.000 quando non è impostato. Il valore massimo di take può essere 250.000. |
timeSeriesId |
Time |
Valore ID serie temporale singolo che identifica in modo univoco una singola istanza della serie temporale, ad esempio un dispositivo. Si noti che un singolo ID serie temporale può essere composito se più proprietà vengono specificate come ID serie temporale in fase di creazione dell'ambiente. La posizione e il tipo di valori devono corrispondere alle proprietà DELL'ID serie temporale specificate nell'ambiente e restituite dall'API Get Model Setting. Non può essere Null. |
GetSeries
Ottenere una query serie. Consente di recuperare una serie temporale di valori di variabili calcolate dagli eventi per un determinato ID serie temporale e intervallo di ricerca.
Nome | Tipo | Descrizione |
---|---|---|
filter |
Filtro di primo livello sugli eventi che limitano il numero di eventi considerati per il calcolo. Questo filtro è AND'ed con filtro in ogni variabile. Esempio: "$event. Status.String='Good'". Opzionale. |
|
inlineVariables |
object |
Variabili inline facoltative a parte quelle già definite nel tipo time series nel modello. Quando il nome della variabile inline è lo stesso nome del modello, la definizione della variabile inline ha la precedenza. Può essere Null. |
projectedVariables |
string[] |
Variabili selezionate che devono essere proiettate nel risultato della query. Quando è null o non è impostato, vengono restituite tutte le variabili di tipo inlineVariables e time series nel modello. Può essere Null. |
searchSpan |
Intervallo di tempo in cui viene eseguita la query. Non può essere Null. |
|
take |
integer (int32) |
Numero massimo di valori di proprietà nell'intero set di risposte, non il numero massimo di valori delle proprietà per pagina. Il valore predefinito è 10.000 quando non è impostato. Il valore massimo di take può essere 250.000. |
timeSeriesId |
Time |
Valore ID serie temporale singolo che identifica in modo univoco una singola istanza della serie temporale, ad esempio un dispositivo. Si noti che un singolo ID serie temporale può essere composito se più proprietà vengono specificate come ID serie temporale in fase di creazione dell'ambiente. La posizione e il tipo di valori devono corrispondere alle proprietà DELL'ID serie temporale specificate nell'ambiente e restituite dall'API Get Model Setting. Non può essere Null. |
Interpolation
Operazione di interpolazione da eseguire sui punti dati non elaborati. Attualmente è consentito solo il campionamento delle serie temporali interpolate. Funzione di aggregazione consentita, ad esempio left($value). Può essere Null se non è necessario applicare alcuna interpolazione.
Nome | Tipo | Descrizione |
---|---|---|
boundary |
Intervallo di tempo a sinistra e a destra dell'intervallo di ricerca da usare per l'interpolazione. Ciò è utile negli scenari in cui i punti dati mancano vicino all'inizio o alla fine dell'intervallo di ricerca di input. Può essere Null. |
|
kind |
Tipo di tecnica di interpolazione: "Lineare" o "Passaggio". |
InterpolationKind
Tipo di tecnica di interpolazione: "Lineare" o "Passaggio".
Valore | Descrizione |
---|---|
Linear | |
Step |
NumericVariable
La variabile numerica rappresenta un singolo segnale numerico continuo che può essere ricostruito usando l'interpolazione.
Nome | Tipo | Descrizione |
---|---|---|
aggregation |
Espressione di serie temporali di aggregazione quando il tipo è "numerico" viene usato per rappresentare l'aggregazione che deve essere eseguita sull'espressione $value. Ciò richiede $value da specificare e può usare solo $value all'interno delle funzioni di aggregazione. Ad esempio, l'aggregazione per calcolare almeno il $value viene scritta come: "min($value)". |
|
filter |
Filtrare gli eventi che limitano il numero di eventi da considerare per il calcolo. Esempio: "$event. Status.String='Good'". Opzionale. |
|
interpolation |
Operazione di interpolazione da eseguire sui punti dati non elaborati. Attualmente è consentito solo il campionamento delle serie temporali interpolate. Funzione di aggregazione consentita, ad esempio left($value). Può essere Null se non è necessario applicare alcuna interpolazione. |
|
kind |
string:
numeric |
I valori "kind" consentiti sono : "numeric" o "aggregate". Anche se "numerico" consente di specificare il valore del segnale ricostruito e l'espressione per aggregarle, il tipo "aggregate" consente di aggregare direttamente le proprietà dell'evento senza specificare il valore. |
value |
L'espressione time series value viene usata per rappresentare il valore del segnale che verrà aggregato o interpolato. Ad esempio, i valori di temperatura dell'evento sono rappresentati come segue: "$event. Temperature.Double". |
PropertyTypes
Tipo della proprietà.
Valore | Descrizione |
---|---|
Bool | |
DateTime | |
Double | |
Long | |
String | |
TimeSpan |
PropertyValues
Valori di una singola proprietà corrispondente ai timestamp. Può contenere valori Null. Il tipo di valori corrisponde al tipo di proprietà.
Nome | Tipo | Descrizione |
---|---|---|
name |
string |
Nome della proprietà. |
type |
Tipo della proprietà. |
|
values |
Values[] |
Valori di una singola proprietà corrispondente ai timestamp. Può contenere valori Null. Il tipo di valori corrisponde al tipo di proprietà. |
QueryRequest
Richiedere di eseguire una query di serie temporali sugli eventi. È necessario impostare esattamente uno dei "getEvents", "getSeries" o "aggregateSeries".
Nome | Tipo | Descrizione |
---|---|---|
aggregateSeries |
Query aggregate series. Consente di calcolare una serie temporale aggregata dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
|
getEvents |
Query Recupera eventi. Consente di recuperare eventi non elaborati per un determinato ID serie temporale e intervallo di ricerca. |
|
getSeries |
Ottenere una query serie. Consente di recuperare una serie temporale di valori di variabili calcolate dagli eventi per un determinato ID serie temporale e intervallo di ricerca. |
QueryResultPage
Singola pagina dei risultati della query. Se la query non è ancora stata completata, verrà impostato un token di continuazione in una pagina. In questo caso, per ottenere la pagina successiva dei risultati, inviare di nuovo la stessa richiesta con il parametro del token di continuazione. Se la query è stata completata, il token di continuazione è Null. È anche possibile ottenere una pagina vuota con solo il token di continuazione impostato quando non sono stati ancora calcolati risultati di query. Se il paging è stato completato (il token di continuazione è Null), i timestamp e le proprietà possono essere vuoti se non sono presenti dati da restituire.
Nome | Tipo | Descrizione |
---|---|---|
continuationToken |
string |
Se restituito, ciò significa che i risultati correnti rappresentano un risultato parziale. Il token di continuazione consente di ottenere la pagina successiva dei risultati. Per ottenere la pagina successiva dei risultati della query, inviare la stessa richiesta con il parametro del token di continuazione nell'intestazione HTTP "x-ms-continuation". |
progress |
number (double) |
Avanzamento approssimativo della query in percentuale. Può essere compreso tra 0 e 100. Quando il token di continuazione nella risposta è Null, l'avanzamento dovrebbe essere 100. |
properties |
Raccolta di proprietà e valori delle serie temporali per ognuno dei timestamp. Può essere Null se il server non è riuscito a riempire la pagina in questa richiesta oppure può essere vuoto se non sono presenti altri oggetti quando il token di continuazione è Null. |
|
timestamps |
string[] (date-time) |
Timestamp dei valori della serie temporale. Se viene usata un'aggregazione a intervalli, i timestamp rappresentano l'inizio degli intervalli corrispondenti. Se gli eventi vengono recuperati, i timestamp sono valori di timestamp $ts proprietà degli eventi. Può essere Null se il server non è riuscito a riempire la pagina in questa richiesta oppure può essere vuoto se non sono presenti altri oggetti quando il token di continuazione è Null. |
TimeSeriesAggregateCategory
Categoria usata nelle variabili categoriche. Una categoria è definita da 'label' e 'values' a cui è assegnata questa etichetta.
Nome | Tipo | Descrizione |
---|---|---|
label |
string |
Nome della categoria che verrà usata per costruire i nomi delle variabili di output. |
values |
object[] |
Elenco di valori a cui viene eseguito il mapping di una categoria. Può essere un elenco univoco di stringhe o un elenco di long. |
TimeSeriesDefaultCategory
Rappresenta la categoria predefinita.
Nome | Tipo | Descrizione |
---|---|---|
label |
string |
Nome della categoria predefinita che verrà assegnata ai valori che non corrispondono a quelli definiti nelle 'categorie'. |
TsiError
Informazioni su un errore dell'API.
Nome | Tipo | Descrizione |
---|---|---|
error |
Errore dell'API specifico con un codice di errore e un messaggio. |
TsiErrorBody
Errore dell'API specifico con un codice di errore e un messaggio.
Nome | Tipo | Descrizione |
---|---|---|
code |
string |
Stringa leggibile indipendente dal linguaggio che definisce un codice di errore specifico del servizio. Questo codice funge da indicatore più specifico per il codice di errore HTTP specificato nella risposta. Può essere usato per gestire casi di errore specifici a livello di codice. |
details |
Contiene informazioni aggiuntive sull'errore. Può essere Null. |
|
innerError |
Contiene un errore più specifico che restringe la causa. Può essere Null. |
|
message |
string |
Rappresentazione indipendente dal linguaggio e leggibile dell'errore. È concepito come un aiuto per gli sviluppatori e non è adatto per l'esposizione agli utenti finali. |
target |
string |
Destinazione dell'errore specifico, ad esempio il nome della proprietà in errore. Può essere Null. |
TsiErrorDetails
Informazioni aggiuntive sull'errore.
Nome | Tipo | Descrizione |
---|---|---|
code |
string |
Stringa leggibile indipendente dal linguaggio che definisce un codice di errore specifico del servizio. Questo codice funge da indicatore più specifico per il codice di errore HTTP specificato nella risposta. Può essere usato per gestire casi di errore specifici a livello di codice. |
message |
string |
Rappresentazione indipendente dal linguaggio e leggibile dell'errore. È concepito come un aiuto per gli sviluppatori e non è adatto per l'esposizione agli utenti finali. |
Tsx
Espressione time series (TSX) scritta come singola stringa. Esempi: "$event. Status.String='Good'", "avg($event. Temperatura)". Vedere la documentazione su come scrivere espressioni time series.
Nome | Tipo | Descrizione |
---|---|---|
tsx |
string |
Espressione time series (TSX) scritta come singola stringa. Esempi: "$event. Status.String='Good'", "avg($event. Temperatura)". Vedere la documentazione su come scrivere espressioni time series. |