waylay-sdk-data-types

Waylay Broker Types


Keywords
Waylay, Broker, Types
License
Other
Install
pip install waylay-sdk-data-types==2.14.0.20240423

Documentation

Waylay Data Service

Data is ingested into the platform by the Waylay Broker.

This Python package is automatically generated based on the Waylay Data OpenAPI specification (API version: 2.14.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-data sub-package contains the Data api methods.
  • The waylay-sdk-data-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 in waylay-sdk-data.

Requirements.

This package requires Python 3.9+.

Installation

Typically this package is installed when installing the waylay-sdk-core package to enable the service's functionality. When the service api methods are required, waylay-sdk-data is included in:

  • pip install waylay-sdk-core[data] to install waylay-sdk-core along with only this service, or
  • pip install waylay-sdk-core[services] to install waylay-sdk-core along with all services. When the typed models are required, both waylay-sdk-data and waylay-sdk-data-types are included in:
  • pip install waylay-sdk-core[data,data-types] to install waylay-sdk-core along with only this service including the typed models, or
  • pip install waylay-sdk-core[services,services-types] to install waylay-sdk-core along with all services along with the typed models.

Usage

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-data-types` is installed
from waylay.services.data.models.version_response import VersionResponse
try:
    # Get Service Status
    # calls `GET /data/v1/`
    api_response = await waylay_client.data.about.get(
    )
    print("The response of data.about.get:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling data.about.get: %s\n" % e)

For more information, please visit the Waylay API documentation.

Documentation for API Endpoints

All URIs are relative to https://api.waylay.io

Class Method HTTP request Description
AboutApi get GET /data/v1/ Get Service Status
EventsApi post_series POST /data/v1/events Post Events
EventsApi post_series_for_resource POST /data/v1/events/{resourceId} Post Events For Resource
EventsApi remove DELETE /data/v1/{resourceId} Remove Data
EventsApi stream_events GET /data/v1/events/{resourceId} Stream Events For Resource
MessagesApi delete_messages DELETE /data/v1/messages/{resourceId} Remove Messages For Resource
MessagesApi get_latest_document GET /data/v1/messages/{resourceId}/current Retrieve Latest Message
MessagesApi get_latest_messages GET /data/v1/messages/{resourceId} Retrieve Messages For Resource
MessagesApi query_messages POST /data/v1/messages/query Query Messages
SeriesApi delete_series DELETE /data/v1/series/{resourceId} Delete Series
SeriesApi get_datapoints_for_metric_raw GET /data/v1/series/{resourceId}/{metric}/raw Get Unaggregated Values For A Series
SeriesApi get_last_datapoints_for_metric GET /data/v1/series/{resourceId}/{metric}/last Get Last Unaggregated Values For A Series
SeriesApi get_last_metric GET /data/v1/series/{resourceId}/{metric}/latest Get Latest Value For A Series
SeriesApi get_metric_series GET /data/v1/series/{resourceId}/{metric} Query Series
SeriesApi get_series GET /data/v1/series/{resourceId} Get Series Overview
SeriesApi query_time_series POST /data/v1/series/query Query Series Data

Documentation For Models