Time Series Instances - Search
Partial list of hits on search for time series instances based on instance attributes.
POST https://{environmentFqdn}/timeseries/instances/search?api-version=2020-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
environment
|
path | True |
string |
Per environment FQDN, for example 10000000-0000-0000-0000-100000000109.env.timeseries.azure.com. You can obtain this domain name from the response of the Get Environments API, Azure portal, or Azure Resource Manager. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Currently supported version is "2020-07-31". |
Request Header
Name | Required | Type | Description |
---|---|---|---|
x-ms-continuation |
string |
Continuation token from previous page of results to retrieve the next page of the results in calls that support pagination. To get the first page results, specify null continuation token as parameter value. Returned continuation token is null if all results have been returned, and there is no next page of results. |
|
x-ms-client-request-id |
string |
Optional client request ID. Service records this value. Allows the service to trace operation across services, and allows the customer to contact support regarding a particular request. |
|
x-ms-client-session-id |
string |
Optional client session ID. Service records this value. Allows the service to trace a group of related operations across services, and allows the customer to contact support regarding a particular group of requests. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
searchString | True |
string |
Query search string that will be matched to the attributes of time series instances. Example: "floor 100". Case-insensitive, must be present, but can be empty string. |
hierarchies |
Parameters of how to return time series instance hierarchies. If null, hierarchies are not returned. If instances parameter is null and hierarchies parameter is not null, only hierarchies with no instances are returned. |
||
instances |
Parameters of how to return time series instances. Can be null. When both the instances and hierarchies parameters are null, the instances are returned in the results based on the default values of parameters, and hierarchies are not returned. |
||
path |
string[] |
Filter on hierarchy path of time series instances. Path is represented as array of string path segments. First element should be hierarchy name. Example: ["Location", "California"]. Optional, case sensitive, never empty and can be null. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successful search response. Headers x-ms-request-id: string |
|
Other Status Codes |
Unexpected error. Headers x-ms-request-id: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
SearchInstancesDefault
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100"
}
Sample response
{
"instances": {
"hits": [
{
"timeSeriesId": [
"Id1One",
"Id2One",
"1.0"
],
"name": "instance1",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": null
},
{
"timeSeriesId": [
"Id1Two",
"Id2Two",
"2.0"
],
"name": "instance2",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": null
}
],
"hitCount": 2,
"continuationToken": null
},
"hierarchyNodes": null
}
SearchInstancesExpandHierarchiesOnly
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": [
"Location"
],
"instances": null,
"hierarchies": {
"expand": {
"kind": "UntilChildren"
},
"sort": {
"by": "Name"
},
"pageSize": 2
}
}
Sample response
{
"instances": {
"hits": [],
"hitCount": 0,
"continuationToken": null
},
"hierarchyNodes": {
"hits": [
{
"name": "California",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "San Diego",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
},
{
"name": "San Francisco",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
}
],
"hitCount": 2,
"continuationToken": null
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
SearchInstancesHierarchiesDefaultInputPage1
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": null,
"instances": {
"recursive": true,
"sort": {
"by": "Rank"
},
"highlights": true,
"pageSize": 1
},
"hierarchies": {
"expand": {
"kind": "UntilChildren"
},
"sort": {
"by": "CumulativeInstanceCount"
},
"pageSize": 1
}
}
Sample response
{
"instances": {
"hits": [
{
"timeSeriesId": [
"Id1Two",
"Id2Two",
"2.0"
],
"name": "instance2",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": {
"timeSeriesId": [
"Id1Two",
"Id2Two",
"2.0"
],
"typeName": "DefaultType",
"name": "instance2",
"description": "<hit>floor</hit> <hit>100</hit>",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"hierarchyNames": [
"Location"
],
"instanceFieldNames": [
"state",
"city"
],
"instanceFieldValues": [
"California",
"San Francisco"
]
}
}
],
"hitCount": 2,
"continuationToken": "c3sic2tpcCI6MiwidGFrZSI6MiwicmVxdWVzdEhhc2hDb2RlIjotNTE3MDUxOTg0LCJlbnZpcm9ubWVudElkIjoiYmY0M2YxMzMtM2Y2OC00ZWMwLWJjYjQtZmQ2NDUzMGU0MjU2In0="
},
"hierarchyNodes": {
"hits": [
{
"name": "Location",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "California",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "San Francisco",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
}
],
"hitCount": 2,
"continuationToken": "aHsic2tpcCI6MiwidGFrZSI6MiwicmVxdWVzdEhhc2hDb2RlIjotNzA4NTgyODU0LCJlbnZpcm9ubWVudElkIjoiYmY0M2YxMzMtM2Y2OC00ZWMwLWJjYjQtZmQ2NDUzMGU0MjU2In0="
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
SearchInstancesHierarchiesDefaultInputPage2
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": null,
"instances": {
"recursive": true,
"sort": {
"by": "Rank"
},
"highlights": true,
"pageSize": 1
},
"hierarchies": {
"expand": {
"kind": "UntilChildren"
},
"sort": {
"by": "CumulativeInstanceCount"
},
"pageSize": 1
}
}
Sample response
{
"instances": {
"hits": [
{
"timeSeriesId": [
"Id1One",
"Id2One",
"1.0"
],
"name": "instance1",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": {
"timeSeriesId": [
"Id1One",
"Id2One",
"1.0"
],
"typeName": "DefaultType",
"name": "instance1",
"description": "<hit>floor</hit> <hit>100</hit>",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"hierarchyNames": [
"Location"
],
"instanceFieldNames": [
"state",
"city"
],
"instanceFieldValues": [
"California",
"Los Angeles"
]
}
}
],
"hitCount": 2,
"continuationToken": null
},
"hierarchyNodes": null
}
SearchInstancesHierarchiesDefaultInputPage3
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": null,
"instances": {
"recursive": true,
"sort": {
"by": "Rank"
},
"highlights": true,
"pageSize": 1
},
"hierarchies": {
"expand": {
"kind": "UntilChildren"
},
"sort": {
"by": "CumulativeInstanceCount"
},
"pageSize": 1
}
}
Sample response
{
"instances": null,
"hierarchyNodes": {
"hits": [
{
"name": "Location",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "California",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "San Diego",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
}
],
"hitCount": 2,
"continuationToken": "aHsic2tpcCI6MiwidGFrZSI6MiwicmVxdWVzdEhhc2hDb2RlIjotNzA4NTgyODU0LCJlbnZpcm9ubWVudElkIjoiYmY0M2YxMzMtM2Y2OC00ZWMwLWJjYjQtZmQ2NDUzMGU0MjU2In0="
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
SearchInstancesOneLevel
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": null,
"instances": {
"recursive": false,
"sort": {
"by": "DisplayName"
},
"highlights": false,
"pageSize": 2
},
"hierarchies": {
"expand": {
"kind": "OneLevel"
},
"sort": {
"by": "Name"
},
"pageSize": 2
}
}
Sample response
{
"instances": {
"hits": [],
"hitCount": 0,
"continuationToken": null
},
"hierarchyNodes": {
"hits": [
{
"name": "Location",
"cumulativeInstanceCount": 2,
"hierarchyNodes": null
}
],
"hitCount": 1,
"continuationToken": null
}
}
SearchInstancesRecursive
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": null,
"instances": {
"recursive": true,
"sort": {
"by": "DisplayName"
},
"highlights": false,
"pageSize": 2
},
"hierarchies": null
}
Sample response
{
"instances": {
"hits": [
{
"timeSeriesId": [
"Id1One",
"Id2One",
"1.0"
],
"name": "instance1",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": null
},
{
"timeSeriesId": [
"Id1Two",
"Id2Two",
"2.0"
],
"name": "instance2",
"typeId": "1be09af9-f089-4d6b-9f0b-48018b5f7393",
"hierarchyIds": [
"1643004c-0a84-48a5-80e5-7688c5ae9295"
],
"highlights": null
}
],
"hitCount": 2,
"continuationToken": null
},
"hierarchyNodes": null
}
SearchInstancesUntilChildren
Sample request
POST https://10000000-0000-0000-0000-100000000109.env.timeseries.azure.com/timeseries/instances/search?api-version=2020-07-31
{
"searchString": "floor 100",
"path": [
"Location"
],
"instances": {
"recursive": false,
"sort": {
"by": "DisplayName"
},
"highlights": false,
"pageSize": 2
},
"hierarchies": {
"expand": {
"kind": "UntilChildren"
},
"sort": {
"by": "Name"
},
"pageSize": 2
}
}
Sample response
{
"instances": {
"hits": [],
"hitCount": 0,
"continuationToken": null
},
"hierarchyNodes": {
"hits": [
{
"name": "California",
"cumulativeInstanceCount": 2,
"hierarchyNodes": {
"hits": [
{
"name": "San Diego",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
},
{
"name": "San Francisco",
"cumulativeInstanceCount": 1,
"hierarchyNodes": null
}
],
"hitCount": 2,
"continuationToken": null
}
}
],
"hitCount": 1,
"continuationToken": null
}
}
Definitions
Name | Description |
---|---|
Hierarchies |
Kind of the expansion of hierarchy nodes. When it is set to 'UntilChildren', the hierarchy nodes are expanded recursively until there is more than one child. When it is set to 'OneLevel', the hierarchies are expanded only at the single level matching path search instances parameter. Optional, default is 'UntilChildren'. |
Hierarchies |
Definition of whether to expand hierarchy nodes in the same search instances call. |
Hierarchies |
Value to use for hierarchy node sorting. When it is set to 'CumulativeInstanceCount', the returned hierarchies are sorted based on the total instances belonging to the hierarchy node and its child hierarchy nodes. When it is set to 'Name', the returned hierarchies are sorted based on the hierarchy name. Optional, default is 'CumulativeInstanceCount'. |
Hierarchies |
Definition of sorting of hierarchy nodes. |
Hierarchy |
The hierarchy node which contains the instances matching the query based on the input. May be empty or null. |
Highlights |
Highlighted text of time series instance to be displayed to the user. Highlighting inserts and tags in the portions of text that matched the search string. Do not use any of the highlighted properties to do further API calls. |
Instance |
Time series instance that is returned by instances search call. Returned instance matched the search request and contains highlighted text to be displayed to the user if it is set to 'true'. |
Instances |
Value to use for sorting of the time series instances before being returned by search instances call. When it is set to 'Rank', the returned instances are sorted based on the relevance. When it is set to 'DisplayName', the returned results are sorted based on the display name. Display name is the name of the instance if it exists, otherwise, display name is the time series ID. Default is 'Rank'. |
Instances |
Definition of how time series instances are sorted before being returned by search instances call. |
Search |
The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null. |
Search |
Parameter of how to return time series instance hierarchies by search instances call. |
Search |
Parameters of how to return time series instances by search instances call. |
Search |
Request to execute a search query against time series instances and return matching time series instances. |
Search |
The instances matching the query based on the input. May be empty or null. |
Search |
Single page of the search results. |
Tsi |
Information about an API error. |
Tsi |
A particular API error with an error code and a message. |
Tsi |
Additional error information. |
HierarchiesExpandKind
Kind of the expansion of hierarchy nodes. When it is set to 'UntilChildren', the hierarchy nodes are expanded recursively until there is more than one child. When it is set to 'OneLevel', the hierarchies are expanded only at the single level matching path search instances parameter. Optional, default is 'UntilChildren'.
Name | Type | Description |
---|---|---|
OneLevel |
string |
|
UntilChildren |
string |
HierarchiesExpandParameter
Definition of whether to expand hierarchy nodes in the same search instances call.
Name | Type | Description |
---|---|---|
kind |
Kind of the expansion of hierarchy nodes. When it is set to 'UntilChildren', the hierarchy nodes are expanded recursively until there is more than one child. When it is set to 'OneLevel', the hierarchies are expanded only at the single level matching path search instances parameter. Optional, default is 'UntilChildren'. |
HierarchiesSortBy
Value to use for hierarchy node sorting. When it is set to 'CumulativeInstanceCount', the returned hierarchies are sorted based on the total instances belonging to the hierarchy node and its child hierarchy nodes. When it is set to 'Name', the returned hierarchies are sorted based on the hierarchy name. Optional, default is 'CumulativeInstanceCount'.
Name | Type | Description |
---|---|---|
CumulativeInstanceCount |
string |
|
Name |
string |
HierarchiesSortParameter
Definition of sorting of hierarchy nodes.
Name | Type | Description |
---|---|---|
by |
Value to use for hierarchy node sorting. When it is set to 'CumulativeInstanceCount', the returned hierarchies are sorted based on the total instances belonging to the hierarchy node and its child hierarchy nodes. When it is set to 'Name', the returned hierarchies are sorted based on the hierarchy name. Optional, default is 'CumulativeInstanceCount'. |
HierarchyHit
The hierarchy node which contains the instances matching the query based on the input. May be empty or null.
Name | Type | Description |
---|---|---|
cumulativeInstanceCount |
integer |
Total number of instances that belong to this node and it's subtrees matching the query. |
hierarchyNodes |
Child hierarchy nodes of this node. May be empty or null. |
|
name |
string |
Name of the hierarchy node. May be empty, cannot be null. |
Highlights
Highlighted text of time series instance to be displayed to the user. Highlighting inserts and tags in the portions of text that matched the search string. Do not use any of the highlighted properties to do further API calls.
Name | Type | Description |
---|---|---|
description |
string |
Highlighted description of time series instance. May be null. |
hierarchyIds |
string[] |
List of highlighted time series hierarchy IDs that time series instance belongs to. Cannot be used to lookup hierarchies. May be null. |
hierarchyNames |
string[] |
List of highlighted time series hierarchy names that time series instance belongs to. Cannot be used to lookup hierarchies. May be null. |
instanceFieldNames |
string[] |
List of highlighted time series instance field names. May be null. |
instanceFieldValues |
string[] |
List of highlighted time series instance field values. May be null. |
name |
string |
Highlighted name of time series instance. May be null. |
timeSeriesId |
string[] |
List of highlighted string values of Time Series ID for displaying. Cannot be used to lookup instance. |
typeName |
string |
Highlighted time series type name that this instance belongs to. |
InstanceHit
Time series instance that is returned by instances search call. Returned instance matched the search request and contains highlighted text to be displayed to the user if it is set to 'true'.
Name | Type | Description |
---|---|---|
hierarchyIds |
string[] |
List of time series hierarchy IDs that time series instance which matched the search request belongs to. Cannot be used to lookup hierarchies. May be null. |
highlights |
Highlighted text of time series instance to be displayed to the user. Highlighting inserts and tags in the portions of text that matched the search string. Do not use any of the highlighted properties to do further API calls. |
|
name |
string |
Name of the time series instance that matched the search request. May be null. |
timeSeriesId |
Time |
Time series ID of the time series instance that matched the search request. |
typeId |
string |
Represents the type that time series instance which matched the search request belongs to. Never null. |
InstancesSortBy
Value to use for sorting of the time series instances before being returned by search instances call. When it is set to 'Rank', the returned instances are sorted based on the relevance. When it is set to 'DisplayName', the returned results are sorted based on the display name. Display name is the name of the instance if it exists, otherwise, display name is the time series ID. Default is 'Rank'.
Name | Type | Description |
---|---|---|
DisplayName |
string |
|
Rank |
string |
InstancesSortParameter
Definition of how time series instances are sorted before being returned by search instances call.
Name | Type | Description |
---|---|---|
by |
Value to use for sorting of the time series instances before being returned by search instances call. When it is set to 'Rank', the returned instances are sorted based on the relevance. When it is set to 'DisplayName', the returned results are sorted based on the display name. Display name is the name of the instance if it exists, otherwise, display name is the time series ID. Default is 'Rank'. |
SearchHierarchyNodesResponse
The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null.
Name | Type | Description |
---|---|---|
continuationToken |
string |
If returned, this means that current results represent a partial result. Continuation token allows to get the next page of results. To get the next page of query results, send the same request with continuation token parameter in "x-ms-continuation" HTTP header. |
hitCount |
integer |
Total number of hierarchy nodes which contains the instances matching the query based on the input. |
hits |
The list of hierarchy nodes which contains the instances matching the query based on the input. May be empty. |
SearchInstancesHierarchiesParameters
Parameter of how to return time series instance hierarchies by search instances call.
Name | Type | Description |
---|---|---|
expand |
Definition of whether to expand hierarchy nodes in the same search instances call. Optional, default is 'UntilChildren'. |
|
pageSize |
integer |
Maximum number of hierarchies in the same level to return in the same page. Optional, default is 10 when not set. Range is from 1 to 100. If there are results beyond the page size, the continuation token can be used to fetch the next page. |
sort |
Definition of sorting of hierarchy nodes. Optional, default is 'CumulativeInstanceCount'. |
SearchInstancesParameters
Parameters of how to return time series instances by search instances call.
Name | Type | Description |
---|---|---|
highlights |
boolean |
Definition of highlighted search results or not. When it is set to 'true', the highlighted search results are returned. When it is set to 'false', the highlighted search results are not returned. Default is 'true'. |
pageSize |
integer |
Maximum number of instances expected in each page of the result. Defaults to 10 when not set. Ranges from 1 to 100. If there are results beyond the page size, the user can use the continuation token to fetch the next page. |
recursive |
boolean |
Definition of which instances are returned. When recursive is set to 'true', all instances that have the path that starts with path the path parameter are returned. When recursive is set to 'false', only instances that have the path that exactly matches the path parameter are returned. Using recursive search allows to implement search user experience, while using non-recursive search allows to implement navigation experience. Optional, default is 'true'. |
sort |
Definition of how time series instances are sorted before being returned by search instances call - relevance or alphabetical. Optional, default is "Rank". |
SearchInstancesRequest
Request to execute a search query against time series instances and return matching time series instances.
Name | Type | Description |
---|---|---|
hierarchies |
Parameters of how to return time series instance hierarchies. If null, hierarchies are not returned. If instances parameter is null and hierarchies parameter is not null, only hierarchies with no instances are returned. |
|
instances |
Parameters of how to return time series instances. Can be null. When both the instances and hierarchies parameters are null, the instances are returned in the results based on the default values of parameters, and hierarchies are not returned. |
|
path |
string[] |
Filter on hierarchy path of time series instances. Path is represented as array of string path segments. First element should be hierarchy name. Example: ["Location", "California"]. Optional, case sensitive, never empty and can be null. |
searchString |
string |
Query search string that will be matched to the attributes of time series instances. Example: "floor 100". Case-insensitive, must be present, but can be empty string. |
SearchInstancesResponse
The instances matching the query based on the input. May be empty or null.
Name | Type | Description |
---|---|---|
continuationToken |
string |
If returned, this means that current results represent a partial result. Continuation token allows to get the next page of results. To get the next page of query results, send the same request with continuation token parameter in "x-ms-continuation" HTTP header. |
hitCount |
integer |
Total number of instances matching the query based on the input. |
hits |
The list of instances matching the query based on the input. May be empty. |
SearchInstancesResponsePage
Single page of the search results.
Name | Type | Description |
---|---|---|
hierarchyNodes |
The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null. |
|
instances |
The instances matching the query based on the input. May be empty or null. |
TsiError
Information about an API error.
Name | Type | Description |
---|---|---|
error |
A particular API error with an error code and a message. |
TsiErrorBody
A particular API error with an error code and a message.
Name | Type | Description |
---|---|---|
code |
string |
Language-independent, human-readable string that defines a service-specific error code. This code serves as a more specific indicator for the HTTP error code specified in the response. Can be used to programmatically handle specific error cases. |
details |
Contains additional error information. May be null. |
|
innerError |
Contains more specific error that narrows down the cause. May be null. |
|
message |
string |
Human-readable, language-independent representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users. |
target |
string |
Target of the particular error (for example, the name of the property in error). May be null. |
TsiErrorDetails
Additional error information.
Name | Type | Description |
---|---|---|
code |
string |
Language-independent, human-readable string that defines a service-specific error code. This code serves as a more specific indicator for the HTTP error code specified in the response. Can be used to programmatically handle specific error cases. |
message |
string |
Human-readable, language-independent representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users. |