Execute and store queries on the Waylay timeseries.
Protocol version: v1.
This Python package is automatically generated based on the Waylay Queries OpenAPI specification (API version: 0.5.0) For more information, please visit the openapi specification.
It consists of two sub-packages that are both plugins for the waylay-sdk-core package.
- The
waylay-sdk-queries
sub-package contains the Queries api methods. - The
waylay-sdk-queries-types
sub-package is an extension that contains the typed model classes for all path params, query params, body params and responses for each of the api methods inwaylay-sdk-queries
.
This package requires Python 3.9+.
Normally this package is installed together with support for other services using the waylay-sdk umbrella package:
pip install waylay-sdk
will installwaylay-sdk-queries
together with the SDK api packages for other services.pip install waylay-sdk[types-queries]
will additionally install the types packagewaylay-sdk-queries-types
.pip install waylay-sdk[types]
will install the types packages for this and all other services.
Alternatively, you can install support for this queries service only, installing or extending an existing waylay-sdk-core:
pip install waylay-sdk-queries
to only install api support for queries.pip install waylay-sdk-queries[types]
to additionally install type support for queries.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-queries-types` is installed
from waylay.services.queries.models.query_input import QueryInput
from waylay.services.queries.models.query_result import QueryResult
try:
# Execute Query
# calls `POST /queries/v1/data`
api_response = await waylay_client.queries.execute.execute(
# query parameters:
query = {
'resource': '13efb488-75ac-4dac-828a-d49c5c2ebbfc'
'metric': 'temperature'
},
# json data: use a generated model or a json-serializable python data structure (dict, list)
json = waylay.services.queries.QueryInput() # QueryInput |
headers = {
'accept': 'accept_example',
},
)
print("The response of queries.execute.execute:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling queries.execute.execute: %s\n" % e)
For more information, please visit the Waylay API documentation.
All URIs are relative to https://api.waylay.io
Class | Method | HTTP request | Description |
---|---|---|---|
ExecuteApi | execute_by_name | GET /queries/v1/data/{query_name} | Execute Named Query |
ExecuteApi | execute | POST /queries/v1/data | Execute Query |
ManageApi | create | POST /queries/v1/query | Post Query |
ManageApi | get | GET /queries/v1/query/{query_name} | Get Query |
ManageApi | list | GET /queries/v1/query | List Queries |
ManageApi | remove | DELETE /queries/v1/query/{query_name} | Remove Query |
ManageApi | update | PUT /queries/v1/query/{query_name} | Update Query |
StatusApi | get | GET /queries/v1 | Get Version And Health |
- AggregationByResourceAndMetricValue
- AggregationByResourceOrMetricValue
- AggregationMethod
- AggregationMethodOneOf
- AggregationMethodOneOf1
- AggregationMethodOneOf2
- AggregationMethodOneOf3
- AggregationMethodOneOf4
- AggregationMethodOneOf5
- AggregationMethodOneOf6
- AggregationMethodOneOf7
- AggregationMethodOneOf8
- AggregationsInner
- AlignAt
- AlignShift
- Alignment
- AlignmentGridInterval
- AlignmentTimezone
- CauseException
- ColumnDataSet
- ColumnDataSetDataAxis
- ColumnHeader
- ColumnHeadersInner
- Data
- DataAxisOption
- DataSetAttributes
- DataSetWindow
- Datum
- DefaultAggregation
- DefaultInterpolation
- DeleteResponse
- EmbeddingsValue
- FromOverride
- GroupingInterval
- GroupingIntervalOverride
- GroupingIntervalOverrideOneOf
- HALLink
- HALLinkMethod
- HALLinkRole
- HTTPValidationError
- HeaderArrayOption
- Hierarchical
- Interpolation
- InterpolationMethod
- InterpolationMethodOneOf
- InterpolationMethodOneOf1
- InterpolationMethodOneOf10
- InterpolationMethodOneOf11
- InterpolationMethodOneOf12
- InterpolationMethodOneOf13
- InterpolationMethodOneOf2
- InterpolationMethodOneOf3
- InterpolationMethodOneOf4
- InterpolationMethodOneOf5
- InterpolationMethodOneOf6
- InterpolationMethodOneOf7
- InterpolationMethodOneOf8
- InterpolationMethodOneOf9
- InterpolationSpec
- LinksValue
- LocationInner
- Message
- MessageArguments
- MessageLevel
- MessageProperties
- ObjectData
- ObjectDataSet
- QueriesListResponse
- QueryDefinition
- QueryEntityInput
- QueryExecutionMessage
- QueryExecutionMessageLevel
- QueryHALLinks
- QueryInput
- QueryListHALLinks
- QueryListItem
- QueryOutput
- QueryResponse
- QueryResult
- QueryUpdateInput
- Render
- Render1
- RenderMode
- RenderModeOneOf
- RenderModeOneOf1
- RenderModeOneOf2
- RenderModeOneOf3
- RenderModeOneOf4
- RenderModeOneOf5
- RenderModeOneOf6
- RenderModeOneOf7
- RenderModeOneOf8
- RenderModeOneOf9
- ResponseDataSet
- RowDataSet
- RowDataSetDataAxis
- RowHeader
- RowHeadersInner
- SeriesDataSet
- SeriesSpec
- TimeWindowFrom
- TimeWindowUntil
- ValidationError
- Window
- WindowOverride