azure.timeseries
Module azure.timeseries
Definitions

ballerinax/azure.timeseries Ballerina library
Overview
This is a generated connector from Azure Time Series Insights API 2020-07-31 version OpenAPI specification.
Time Series Insights environment data plane client for Gen2 (GA L1 SKU) environments.
Prerequisites
- Create an Azure account
- Create an Azure Time Series Insights account
- Obtain tokens
- Use this guide to obtain the credentials which are needed to create the <ACCESS_TOKEN>
Clients
azure.timeseries: Client
This is a generated connector from Azure Time Series Insights API 2020-07-31 version OpenAPI specification. Time Series Insights environment data plane client for Gen2 (GA L1 SKU) environments.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an Azure Time Series Insights account and obtain OAuth tokens following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
queryGetavailability
function queryGetavailability(string apiVersion, string? storeType, string? xMsClientRequestId, string? xMsClientSessionId) returns AvailabilityResponse|error
Returns the time range and distribution of event count over the event timestamp ($ts). This API can be used to provide landing experience of navigating to the environment.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- storeType string? (default ()) - For the environments with warm store enabled, the query can be executed either on the 'WarmStore' or 'ColdStore'. This parameter in the query defines which store the query should be executed on. If not defined, the query will be executed on the cold store.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- AvailabilityResponse|error - Successful operation.
queryGeteventschema
function queryGeteventschema(string apiVersion, GetEventSchemaRequest payload, string? storeType, string? xMsClientRequestId, string? xMsClientSessionId) returns EventSchema|error
Returns environment event schema for a given search span. Event schema is a set of property definitions. Event schema may not be contain all persisted properties when there are too many properties.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload GetEventSchemaRequest - Parameters to get event schema.
- storeType string? (default ()) - For the environments with warm store enabled, the query can be executed either on the 'WarmStore' or 'ColdStore'. This parameter in the query defines which store the query should be executed on. If not defined, the query will be executed on the cold store.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- EventSchema|error - Successful operation.
modelsettingsGet
function modelsettingsGet(string apiVersion, string? xMsClientRequestId, string? xMsClientSessionId) returns ModelSettingsResponse|error
Returns the model settings which includes model display name, Time Series ID properties and default type ID. Every Gen2 environment has a model that is automatically created.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- ModelSettingsResponse|error - Successful operation.
modelsettingsUpdate
function modelsettingsUpdate(string apiVersion, UpdateModelSettingsRequest payload, string? xMsClientRequestId, string? xMsClientSessionId) returns ModelSettingsResponse|error
Updates time series model settings - either the model name or default type ID.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload UpdateModelSettingsRequest - Model settings update request body.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- ModelSettingsResponse|error - Successful operation returns new full model settings.
queryExecute
function queryExecute(string apiVersion, QueryRequest payload, string? storeType, string? xMsContinuation, string? xMsClientRequestId, string? xMsClientSessionId) returns QueryResultPage|error
Executes Time Series Query in pages of results - Get Events, Get Series or Aggregate Series.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload QueryRequest - Time series query request body.
- storeType string? (default ()) - For the environments with warm store enabled, the query can be executed either on the 'WarmStore' or 'ColdStore'. This parameter in the query defines which store the query should be executed on. If not defined, the query will be executed on the cold store.
- xMsContinuation string? (default ()) - 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.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- QueryResultPage|error - Successful query.
timeseriesinstancesList
function timeseriesinstancesList(string apiVersion, string? xMsContinuation, string? xMsClientRequestId, string? xMsClientSessionId) returns GetInstancesPage|error
Gets time series instances in pages.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- xMsContinuation string? (default ()) - 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.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- GetInstancesPage|error - Successful operation.
timeseriesinstancesExecutebatch
function timeseriesinstancesExecutebatch(string apiVersion, InstancesBatchRequest payload, string? xMsClientRequestId, string? xMsClientSessionId) returns InstancesBatchResponse|error
Executes a batch get, create, update, delete operation on multiple time series instances.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload InstancesBatchRequest - Time series instances suggest request body.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- InstancesBatchResponse|error - Successful operation.
timeseriesinstancesSuggest
function timeseriesinstancesSuggest(string apiVersion, InstancesSuggestRequest payload, string? xMsClientRequestId, string? xMsClientSessionId) returns InstancesSuggestResponse|error
Suggests keywords based on time series instance attributes to be later used in Search Instances.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload InstancesSuggestRequest - Time series instances suggest request body.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- InstancesSuggestResponse|error - Successful operation.
timeseriesinstancesSearch
function timeseriesinstancesSearch(string apiVersion, SearchInstancesRequest payload, string? xMsContinuation, string? xMsClientRequestId, string? xMsClientSessionId) returns SearchInstancesResponsePage|error
Partial list of hits on search for time series instances based on instance attributes.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload SearchInstancesRequest - Time series instances search request body.
- xMsContinuation string? (default ()) - 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.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- SearchInstancesResponsePage|error - Successful search response.
timeseriestypesList
function timeseriestypesList(string apiVersion, string? xMsContinuation, string? xMsClientRequestId, string? xMsClientSessionId) returns GetTypesPage|error
Gets time series types in pages.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- xMsContinuation string? (default ()) - 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.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- GetTypesPage|error - Successful operation.
timeseriestypesExecutebatch
function timeseriestypesExecutebatch(string apiVersion, TypesBatchRequest payload, string? xMsClientRequestId, string? xMsClientSessionId) returns TypesBatchResponse|error
Executes a batch get, create, update, delete operation on multiple time series types.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload TypesBatchRequest - Time series types batch request body.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- TypesBatchResponse|error - Successful operation.
timeserieshierarchiesList
function timeserieshierarchiesList(string apiVersion, string? xMsContinuation, string? xMsClientRequestId, string? xMsClientSessionId) returns GetHierarchiesPage|error
Returns time series hierarchies definitions in pages.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- xMsContinuation string? (default ()) - 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.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- GetHierarchiesPage|error - Successful operation.
timeserieshierarchiesExecutebatch
function timeserieshierarchiesExecutebatch(string apiVersion, HierarchiesBatchRequest payload, string? xMsClientRequestId, string? xMsClientSessionId) returns HierarchiesBatchResponse|error
Executes a batch get, create, update, delete operation on multiple time series hierarchy definitions.
Parameters
- apiVersion string - Version of the API to be used with the client request. Currently supported version is "2020-07-31".
- payload HierarchiesBatchRequest - Time series hierarchies batch request body.
- xMsClientRequestId string? (default ()) - 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.
- xMsClientSessionId string? (default ()) - 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.
Return Type
- HierarchiesBatchResponse|error - Successful operation.
Records
azure.timeseries: AggregateSeries
Aggregate Series query. Allows to calculate an aggregated time series from events for a given Time Series ID and search span.
Fields
- timeSeriesId TimeSeriesId - A single Time Series ID value that is an array of primitive values that uniquely identifies a time series instance (e.g. a single device). Note that a single Time Series ID can be composite if multiple properties are specified as Time Series ID at environment creation time. The position and type of values must match Time Series ID properties specified on the environment and returned by Get Model Setting API. Cannot be empty.
- searchSpan DateTimeRange - The range of time. Cannot be null or negative.
- filter Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
- interval string - Interval size is specified in ISO-8601 duration format. All intervals are the same size. One month is always converted to 30 days, and one year is always 365 days. Examples: 1 minute is "PT1M", 1 millisecond is "PT0.001S". For more information, see https://www.w3.org/TR/xmlschema-2/#duration
- projectedVariables string[]? - This allows the user to optionally select the variables that needs to be projected. When it is null or not set, all the variables from inlineVariables and model are returned. Can be null.
- inlineVariables record {}? - This allows the user the optionally define inline-variables apart from the ones already defined in the model. When the inline variable names have the same name as the model, the inline variable definition takes precedence. Can be null.
azure.timeseries: AggregateVariable
Aggregate variable represents any aggregation calculation. Aggregate Variables does not support interpolation.
Fields
- Fields Included from *Variable
- aggregation Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
azure.timeseries: Availability
Event availability information when environment contains events. Contains time range of events and approximate distribution of events over time.
Fields
- range DateTimeRange? - The range of time. Cannot be null or negative.
- intervalSize string? - Interval size for the returned distribution of the events. Returned interval is selected to return a reasonable number of points. All intervals are the same size. On the wire interval is specified in ISO-8601 duration format. One month is always converted to 30 days, and one year is always 365 days. Examples: 1 minute is "PT1M", 1 millisecond is "PT0.001S". For more information, see https://www.w3.org/TR/xmlschema-2/#duration
- distribution record {}? - Approximate distribution of events over time.
azure.timeseries: AvailabilityResponse
Response of Get Availability operation. When environment has no data, availability property is null.
Fields
- availability Availability? - Event availability information when environment contains events. Contains time range of events and approximate distribution of events over time.
azure.timeseries: CategoricalVariable
Categorical variable represents signal that needs to be analyzed based on the count or duration of occurrence of limited set of defined values.
Fields
- Fields Included from *Variable
- value Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
- interpolation Interpolation? - The interpolation operation to be performed on the raw data points. Currently, only sampling of interpolated time series is allowed. Allowed aggregate function - eg: left($value). Can be null if no interpolation needs to be applied.
- categories TimeSeriesAggregateCategory[]? - Aggregation category types.
- defaultCategory TimeSeriesDefaultCategory? - Represents the default category.
azure.timeseries: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
azure.timeseries: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
azure.timeseries: DateTimeRange
The range of time. Cannot be null or negative.
Fields
- 'from string - Start timestamp of the time range. Start timestamp is inclusive when used in time series query requests. Events that have this timestamp are included.
- to string - End timestamp of the time range. End timestamp is exclusive when used in time series query requests. Events that match this timestamp are excluded. Note that end timestamp is inclusive when returned by Get Availability (meaning that there is an event with this exact "to" timestamp).
azure.timeseries: EventProperty
Property of an event that is either stored or computed. Properties are identified by both name and type. Different events can have properties with same name, but different type.
Fields
- name string? - The name of the property.
- 'type PropertyType? - The type of the property that is either stored in events or computed by a calculation.
azure.timeseries: EventSchema
Event schema of all events within a given search span. Event schema is a set of property definitions. Properties are identified by both name and type. Different events can have properties with same name, but different type. Event schema may not be contain all persisted properties when there are too many properties.
Fields
- properties EventProperty[]? - A set of property definitions. When environment has no data, the returned array is empty.
azure.timeseries: GetEvents
Get Events query. Allows to retrieve raw events for a given Time Series ID and search span.
Fields
- timeSeriesId TimeSeriesId - A single Time Series ID value that is an array of primitive values that uniquely identifies a time series instance (e.g. a single device). Note that a single Time Series ID can be composite if multiple properties are specified as Time Series ID at environment creation time. The position and type of values must match Time Series ID properties specified on the environment and returned by Get Model Setting API. Cannot be empty.
- searchSpan DateTimeRange - The range of time. Cannot be null or negative.
- filter Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
- projectedProperties EventProperty[]? - Projected properties is an array of properties which you want to project. These properties must appear in the events; otherwise, they are not returned.
- take int? - Maximum number of property values in the whole response set, not the maximum number of property values per page. Defaults to 10,000 when not set. Maximum value of take can be 250,000.
azure.timeseries: GetEventSchemaRequest
Request to get the event schema of all events within a given search span.
Fields
- searchSpan DateTimeRange - The range of time. Cannot be null or negative.
azure.timeseries: GetHierarchiesPage
Partial list of time series hierarchies returned in a single request.
Fields
- Fields Included from *PagedResponse
- continuationToken string
- anydata...
- hierarchies TimeSeriesHierarchy[]? - Partial list of time series hierarchies returned in a single request. Can be empty if server was unable to fill the page in this request, or there is no more objects when continuation token is null.
azure.timeseries: GetInstancesPage
Partial list of time series instances returned in a single request.
Fields
- Fields Included from *PagedResponse
- continuationToken string
- anydata...
- instances TimeSeriesInstance[]? - Partial list of time series instances returned in a single request. Can be empty if server was unable to fill the page in this request, or there is no more objects when continuation token is null.
azure.timeseries: GetSeries
Get Series query. Allows to retrieve time series of calculated variable values from events for a given Time Series ID and search span.
Fields
- timeSeriesId TimeSeriesId - A single Time Series ID value that is an array of primitive values that uniquely identifies a time series instance (e.g. a single device). Note that a single Time Series ID can be composite if multiple properties are specified as Time Series ID at environment creation time. The position and type of values must match Time Series ID properties specified on the environment and returned by Get Model Setting API. Cannot be empty.
- searchSpan DateTimeRange - The range of time. Cannot be null or negative.
- filter Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
- projectedVariables string[]? - Selected variables that needs to be projected in the query result. When it is null or not set, all the variables from inlineVariables and time series type in the model are returned. Can be null.
- inlineVariables record {}? - Optional inline variables apart from the ones already defined in the time series type in the model. When the inline variable name is the same name as in the model, the inline variable definition takes precedence. Can be null.
- take int? - Maximum number of property values in the whole response set, not the maximum number of property values per page. Defaults to 10,000 when not set. Maximum value of take can be 250,000.
azure.timeseries: GetTypesPage
Partial list of time series types returned in a single request.
Fields
- Fields Included from *PagedResponse
- continuationToken string
- anydata...
- types TimeSeriesType[]? - Partial list of time series types returned in a single request. Can be empty if server was unable to fill the page with more types in this request, or there is no more types when continuation token is null.
azure.timeseries: HierarchiesBatchRequest
Request to perform a single operation on a batch of hierarchies. Exactly one of "get", "put" or "delete" must be set.
Fields
- get HierarchiesRequestBatchGetDelete? - Request to get or delete multiple time series hierarchies. Exactly one of "hierarchyIds" or "names" must be set.
- put TimeSeriesHierarchy[]? - "put" should be set while creating or updating hierarchies.
- delete HierarchiesRequestBatchGetDelete? - Request to get or delete multiple time series hierarchies. Exactly one of "hierarchyIds" or "names" must be set.
azure.timeseries: HierarchiesBatchResponse
Response of a single operation on a batch of time series hierarchies. Only one of "get", "put" or "delete" will be set.
Fields
- get TimeSeriesHierarchyOrError[]? - List of hierarchy or error objects corresponding by position to the "get" array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful.
- put TimeSeriesHierarchyOrError[]? - List of hierarchy or error object corresponding by position to the "put" array in the request. Hierarchy object is set when operation is successful and error object is set when operation is unsuccessful.
- delete TsiErrorBody[]? - List of error objects corresponding by position to the "delete" array in the request - null when the operation is successful.
azure.timeseries: HierarchiesExpandParameter
Definition of whether to expand hierarchy nodes in the same search instances call.
Fields
- kind string? - 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'.
azure.timeseries: HierarchiesRequestBatchGetDelete
Request to get or delete multiple time series hierarchies. Exactly one of "hierarchyIds" or "names" must be set.
Fields
- hierarchyIds string[]? - List of hierarchy IDs.
- names string[]? - List of hierarchy names.
azure.timeseries: HierarchiesSortParameter
Definition of sorting of hierarchy nodes.
Fields
- 'by string? - 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'.
azure.timeseries: HierarchyHit
The hierarchy node which contains the instances matching the query based on the input. May be empty or null.
Fields
- name string? - Name of the hierarchy node. May be empty, cannot be null.
- cumulativeInstanceCount int? - Total number of instances that belong to this node and it's subtrees matching the query.
- hierarchyNodes SearchHierarchyNodesResponse? - The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null.
azure.timeseries: 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'.
Fields
- timeSeriesId TimeSeriesId? - A single Time Series ID value that is an array of primitive values that uniquely identifies a time series instance (e.g. a single device). Note that a single Time Series ID can be composite if multiple properties are specified as Time Series ID at environment creation time. The position and type of values must match Time Series ID properties specified on the environment and returned by Get Model Setting API. Cannot be empty.
- name string? - Name of the time series instance that matched the search request. May be null.
- typeId string? - Represents the type that time series instance which matched the search request belongs to. Never null.
- 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 InstancehitHighlights? - Highlighted text of time series instance to be displayed to the user. Highlighting inserts <hit> and </hit> tags in the portions of text that matched the search string. Do not use any of the highlighted properties to do further API calls.
azure.timeseries: InstancehitHighlights
Highlighted text of time series instance to be displayed to the user. Highlighting inserts
Fields
- 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.
- name string? - Highlighted name of time series instance. May be null.
- 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.
azure.timeseries: InstanceOrError
Result of a batch operation on a particular time series instance. Instance object is set when operation is successful (except put operation) and error object is set when operation is unsuccessful.
Fields
- instance TimeSeriesInstance? - Time series instances are the time series themselves. In most cases, the deviceId or assetId is the unique identifier of the asset in the environment. Instances have descriptive information associated with them called instance fields. At a minimum, instance fields include hierarchy information. They can also include useful, descriptive data like the manufacturer, operator, or the last service date.
- 'error TsiErrorBody? - A particular API error with an error code and a message.
azure.timeseries: InstancesBatchRequest
Request to perform a single operation on a batch of instances. Exactly one of "get", "put", "update" or "delete" must be set.
Fields
- get InstancesRequestBatchGetOrDelete? - Request to get or delete instances by time series IDs or time series names. Exactly one of "timeSeriesIds" or "names" must be set.
- put TimeSeriesInstance[]? - Time series instances to be created or updated.
- update TimeSeriesInstance[]? - Time series instance to be updated. If instance does not exist, an error is returned.
- delete InstancesRequestBatchGetOrDelete? - Request to get or delete instances by time series IDs or time series names. Exactly one of "timeSeriesIds" or "names" must be set.
azure.timeseries: InstancesBatchResponse
Response of a single operation on a batch of instances. Only one of "get", "put", "update" or "delete" will be set based on the request.
Fields
- get InstanceOrError[]? - List of instance or error objects corresponding by position to the "get" array in the request. Instance object is set when operation is successful and error object is set when operation is unsuccessful.
- put InstanceOrError[]? - List of error objects corresponding by position to the "put" array in the request. Error object is set when operation is unsuccessful.
- update InstanceOrError[]? - List of error objects corresponding by position to the "update" array in the request. Instance object is set when operation is successful and error object is set when operation is unsuccessful.
- delete TsiErrorBody[]? - List of error objects corresponding by position to the "delete" array in the request. Null means the instance has been deleted, or did not exist. Error object is set when operation is unsuccessful (e.g. when there are events associated with this time series instance).
azure.timeseries: InstancesRequestBatchGetOrDelete
Request to get or delete instances by time series IDs or time series names. Exactly one of "timeSeriesIds" or "names" must be set.
Fields
- timeSeriesIds TimeSeriesId[]? - List of time series IDs of the time series instances to return or delete.
- names string[]? - List of names of the time series instances to return or delete.
azure.timeseries: InstancesSearchStringSuggestion
Suggested search string to be used for further search for time series instances.
Fields
- searchString string? - Suggested search string. Can be used for further search for time series instances.
- highlightedSearchString string? - Highlighted suggested search string to be displayed to the user. Highlighting inserts <hit> and </hit> tags in the portions of text that matched the search string. Do not use highlighted search string to do further search calls.
azure.timeseries: InstancesSortParameter
Definition of how time series instances are sorted before being returned by search instances call.
Fields
- 'by string? - 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'.
azure.timeseries: InstancesSuggestRequest
Request to get search string suggestions for time series instances search based on prefix text.
Fields
- searchString string - Search string for which suggestions are required. Empty is allowed, but not null.
- take int? - Maximum number of suggestions expected in the result. Defaults to 10 when not set.
azure.timeseries: InstancesSuggestResponse
Response of getting suggestions for search for time series instances.
Fields
- suggestions InstancesSearchStringSuggestion[]? - List of instance suggestions for searching time series models.
azure.timeseries: Interpolation
The interpolation operation to be performed on the raw data points. Currently, only sampling of interpolated time series is allowed. Allowed aggregate function - eg: left($value). Can be null if no interpolation needs to be applied.
Fields
- kind string? - The type of interpolation technique : "Linear" or "Step".
- boundary InterpolationBoundary? - The time range to the left and right of the search span to be used for Interpolation. This is helpful in scenarios where the data points are missing close to the start or end of the input search span. Can be null.
azure.timeseries: InterpolationBoundary
The time range to the left and right of the search span to be used for Interpolation. This is helpful in scenarios where the data points are missing close to the start or end of the input search span. Can be null.
Fields
- span string? - Search span.
azure.timeseries: ModelSettingsResponse
Response containing full time series model settings which include model name, Time Series ID properties and default type ID.
Fields
- modelSettings TimeSeriesModelSettings? - Time series model settings including model name, Time Series ID properties and default type ID.
azure.timeseries: NumericVariable
Numeric variable represents a single continuous numeric signal that can be reconstructed using interpolation.
Fields
- Fields Included from *Variable
- value Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
- interpolation Interpolation? - The interpolation operation to be performed on the raw data points. Currently, only sampling of interpolated time series is allowed. Allowed aggregate function - eg: left($value). Can be null if no interpolation needs to be applied.
- aggregation Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
azure.timeseries: PagedResponse
Partial result that has continuation token to fetch the next partial result.
Fields
- 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.
azure.timeseries: PropertyValues
Values of a single property corresponding to the timestamps. May contain nulls. Type of values matches the type of property.
Fields
- Fields Included from *EventProperty
- name string
- type PropertyType
- anydata...
- values record {}[]? - Values of a single property corresponding to the timestamps. May contain nulls. Type of values matches the type of property.
azure.timeseries: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
azure.timeseries: QueryRequest
Request to execute a time series query over events. Exactly one of "getEvents", "getSeries" or "aggregateSeries" must be set.
Fields
- getEvents GetEvents? - Get Events query. Allows to retrieve raw events for a given Time Series ID and search span.
- getSeries GetSeries? - Get Series query. Allows to retrieve time series of calculated variable values from events for a given Time Series ID and search span.
- aggregateSeries AggregateSeries? - Aggregate Series query. Allows to calculate an aggregated time series from events for a given Time Series ID and search span.
azure.timeseries: QueryResultPage
A single page of query results. If query has not finished yet, a page will have continuation token set. In this case, to get the next page of results, send the same request again with continuation token parameter. If query has completed, the continuation token is null. It is also possible to get an empty page with only continuation token set when no query results have been computed yet. If paging has completed (continuation token is null), then timestamps and properties may be empty if there is no data to return.
Fields
- Fields Included from *PagedResponse
- continuationToken string
- anydata...
- timestamps string[]? - The timestamps of the values of the time series. If an aggregation over intervals is used, timestamps represent the start of corresponding intervals. If events are retrieved, timestamps are values of timestamp $ts property of events. Can be null if server was unable to fill the page in this request, or can be empty if there are no more objects when continuation token is null.
- properties PropertyValues[]? - Collection of time series properties and values for each of the timestamps. Can be null if server was unable to fill the page in this request, or can be empty if there are no more objects when continuation token is null.
- progress decimal? - Approximate progress of the query in percentage. It can be between 0 and 100. When the continuation token in the response is null, the progress is expected to be 100.
azure.timeseries: SearchHierarchyNodesResponse
The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null.
Fields
- hits HierarchyHit[]? - The list of hierarchy nodes which contains the instances matching the query based on the input. May be empty.
- hitCount int? - Total number of hierarchy nodes which contains the instances matching the query based on the input.
- 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.
azure.timeseries: SearchInstancesHierarchiesParameters
Parameter of how to return time series instance hierarchies by search instances call.
Fields
- expand HierarchiesExpandParameter? - Definition of whether to expand hierarchy nodes in the same search instances call.
- sort HierarchiesSortParameter? - Definition of sorting of hierarchy nodes.
- pageSize int? - 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.
azure.timeseries: SearchInstancesParameters
Parameters of how to return time series instances by search instances call.
Fields
- 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 InstancesSortParameter? - Definition of how time series instances are sorted before being returned by search instances call.
- 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 int? - 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.
azure.timeseries: SearchInstancesRequest
Request to execute a search query against time series instances and return matching time series instances.
Fields
- 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.
- 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.
- instances SearchInstancesParameters? - Parameters of how to return time series instances by search instances call.
- hierarchies SearchInstancesHierarchiesParameters? - Parameter of how to return time series instance hierarchies by search instances call.
azure.timeseries: SearchInstancesResponse
The instances matching the query based on the input. May be empty or null.
Fields
- hits InstanceHit[]? - The list of instances matching the query based on the input. May be empty.
- hitCount int? - Total number of instances matching the query based on the input.
- 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.
azure.timeseries: SearchInstancesResponsePage
Single page of the search results.
Fields
- instances SearchInstancesResponse? - The instances matching the query based on the input. May be empty or null.
- hierarchyNodes SearchHierarchyNodesResponse? - The hierarchy nodes which contains the instances matching the query based on the input. May be empty or null.
azure.timeseries: TimeSeriesAggregateCategory
Category used in categorical variables. A category is defined by 'label' and the 'values' that are assigned this label.
Fields
- label string - The name of the category which will be used in constructing the output variable names.
- values record {}[] - The list of values that a category maps to. Can be either a unique list of string or list of long.
azure.timeseries: TimeSeriesDefaultCategory
Represents the default category.
Fields
- label string - The name of the default category which will be assigned to the values that does not match any of those that are defined in the 'categories'.
azure.timeseries: TimeSeriesHierarchy
Time series hierarchy organizes time series instances into a tree.
Fields
- id string? - Case-sensitive unique hierarchy identifier. Can be null while creating hierarchy objects and then server generates the id, not null on get and delete operations.
- name string - User-given unique name for the type. It is mutable and not null.
- 'source TimeserieshierarchySource - Definition of how time series hierarchy tree levels are created.
azure.timeseries: TimeSeriesHierarchyOrError
Result of a batch operation on a particular time series hierarchy. Hierarchy is set when operation is successful and error object is set when operation is unsuccessful.
Fields
- hierarchy TimeSeriesHierarchy? - Time series hierarchy organizes time series instances into a tree.
- 'error TsiErrorBody? - A particular API error with an error code and a message.
azure.timeseries: TimeserieshierarchySource
Definition of how time series hierarchy tree levels are created.
Fields
- instanceFieldNames string[]? - List of instance field names that must be set in all time series instances that belong to this hierarchy. The order of the instance fields defines the levels in the hierarchy.
azure.timeseries: TimeSeriesIdProperty
A definition of a single property that can be used in time series ID properties defined during environment creation.
Fields
- name string? - The name of the property.
- 'type string? - The type of the property. Currently, only "String" is supported.
azure.timeseries: TimeSeriesInstance
Time series instances are the time series themselves. In most cases, the deviceId or assetId is the unique identifier of the asset in the environment. Instances have descriptive information associated with them called instance fields. At a minimum, instance fields include hierarchy information. They can also include useful, descriptive data like the manufacturer, operator, or the last service date.
Fields
- timeSeriesId TimeSeriesId - A single Time Series ID value that is an array of primitive values that uniquely identifies a time series instance (e.g. a single device). Note that a single Time Series ID can be composite if multiple properties are specified as Time Series ID at environment creation time. The position and type of values must match Time Series ID properties specified on the environment and returned by Get Model Setting API. Cannot be empty.
- typeId string - This represents the type that this instance belongs to. Never null.
- name string? - Optional name of the instance which is unique in an environment. Names acts as a mutable alias or display name of the time series instance. Mutable, may be null.
- description string? - This optional field contains description about the instance.
- hierarchyIds string[]? - Set of time series hierarchy IDs that the instance belong to. May be null.
- instanceFields record {}? - Set of key-value pairs that contain user-defined instance properties. It may be null. Supported property value types are: bool, string, long, double and it cannot be nested or null.
azure.timeseries: TimeSeriesModelSettings
Time series model settings including model name, Time Series ID properties and default type ID.
Fields
- name string? - Time series model display name which is shown in the UX. Examples: "Temperature Sensors", "MyDevices".
- timeSeriesIdProperties TimeSeriesIdProperties? - Time series ID properties defined during environment creation.
- defaultTypeId string? - Default type ID of the model that new time series instances will automatically belong to.
azure.timeseries: TimeSeriesType
Time series type defines variables or formulas for doing computation on events associated with time series instances. Each time series instance is associated with exactly one type. A type can have one or more variables. For example, a time series instance might be of type Temperature Sensor, which consists of the variables avg temperature, min temperature, and max temperature.
Fields
- id string? - Case-sensitive unique type identifier that is immutable. Can be null on create or update requests, and then server generates the ID. Not null on get and delete operations.
- name string - User-given unique name for the type. Mutable, not null.
- description string? - Description of the type. May be null.
- variables record {} - Different variables associated with the type. Not empty, not null.
azure.timeseries: TimeSeriesTypeOrError
Result of a batch operation on a particular time series type. Type object is set when operation is successful and error object is set when operation is unsuccessful.
Fields
- timeSeriesType TimeSeriesType? - Time series type defines variables or formulas for doing computation on events associated with time series instances. Each time series instance is associated with exactly one type. A type can have one or more variables. For example, a time series instance might be of type Temperature Sensor, which consists of the variables avg temperature, min temperature, and max temperature.
- 'error TsiErrorBody? - A particular API error with an error code and a message.
azure.timeseries: TsiError
Information about an API error.
Fields
- 'error TsiErrorBody? - A particular API error with an error code and a message.
azure.timeseries: TsiErrorBody
A particular API error with an error code and a message.
Fields
- 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.
- target string? - Target of the particular error (for example, the name of the property in error). May be null.
- innerError TsiErrorBody? - A particular API error with an error code and a message.
- details TsiErrorDetails[]? - Contains additional error information. May be null.
azure.timeseries: TsiErrorDetails
Additional error information.
Fields
- 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.
azure.timeseries: Tsx
Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
Fields
- tsx string - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
azure.timeseries: TypesBatchRequest
Request to perform a single operation on a batch of time series types. Exactly one of "get", "put" or "delete" must be set.
Fields
- get TypesRequestBatchGetOrDelete? - Request to get or delete time series types by IDs or type names. Exactly one of "typeIds" or "names" must be set.
- put TimeSeriesType[]? - Definition of what time series types to update or create.
- delete TypesRequestBatchGetOrDelete? - Request to get or delete time series types by IDs or type names. Exactly one of "typeIds" or "names" must be set.
azure.timeseries: TypesBatchResponse
Response of a single operation on a batch of time series types. Exactly one of "get", "put" or "delete" will be set.
Fields
- get TimeSeriesTypeOrError[]? - List of types or error objects corresponding by position to the "get" array in the request. Type object is set when operation is successful and error object is set when operation is unsuccessful.
- put TimeSeriesTypeOrError[]? - List of types or error objects corresponding by position to the "put" array in the request. Type object is set when operation is successful and error object is set when operation is unsuccessful.
- delete TsiErrorBody[]? - List of error objects corresponding by position to the "delete" array in the request - null when the operation is successful.
azure.timeseries: TypesRequestBatchGetOrDelete
Request to get or delete time series types by IDs or type names. Exactly one of "typeIds" or "names" must be set.
Fields
- typeIds string[]? - List of IDs of time series types to return or delete.
- names string[]? - List of names of time series types to return or delete.
azure.timeseries: UpdateModelSettingsRequest
Request to update model settings. One of "name" or "defaultTypeId" must be set.
Fields
- name string? - Model display name which is shown in the UX and mutable by the user. Initial value is "DefaultModel".
- defaultTypeId string? - Default type id of the model that new instances will automatically belong to.
azure.timeseries: Variable
Variables are named calculations over values from the events. Time Series Insights variable definitions contain formula and computation rules. Variables are stored in the type definition in Time Series Model and can be provided inline via Query APIs to override the stored definition.
Fields
- kind string - Allowed "kind" values are - "numeric" or "aggregate". While "numeric" allows you to specify value of the reconstructed signal and the expression to aggregate them, the "aggregate" kind lets you directly aggregate on the event properties without specifying value.
- filter Tsx? - Time series expression (TSX) written as a single string. Examples: "$event.Status.String='Good'", "avg($event.Temperature)". Refer to the documentation on how to write time series expressions.
String types
azure.timeseries: PropertyType
PropertyType
The type of the property that is either stored in events or computed by a calculation.
Import
import ballerinax/azure.timeseries;
Metadata
Released date: almost 2 years ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 2
Current verison: 1
Weekly downloads
Keywords
Internet of Things/Device Management
Cost/Paid
Vendor/Microsoft
Contributors