2 unstable releases

Uses new Rust 2024

new 0.2.0 Apr 15, 2025
0.1.0 Apr 11, 2025

#317 in Concurrency

Download history 106/week @ 2025-04-08

106 downloads per month
Used in hab-rs

MIT license

765KB
15K SLoC

Rust API client for hab-rs-api-client

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

For more information, please visit https://www.openhab.org/docs/

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 8
  • Package version: 8
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named hab-rs-api-client and add the following to Cargo.toml under [dependencies]:

hab-rs-api-client = { path = "./hab-rs-api-client" }

Documentation for API Endpoints

All URIs are relative to /rest

Class Method HTTP request Description
ActionsApi execute_thing_action POST /actions/{thingUID}/{actionUid} Executes a thing action.
ActionsApi get_available_actions_for_thing GET /actions/{thingUID} Get all available actions for provided thing UID
AddonsApi get_addon_by_id GET /addons/{addonId} Get add-on with given ID.
AddonsApi get_addon_configuration GET /addons/{addonId}/config Get add-on configuration for given add-on ID.
AddonsApi get_addon_services GET /addons/types Get add-on services.
AddonsApi get_addon_types GET /addons/services Get all add-on types.
AddonsApi get_addons GET /addons Get all add-ons.
AddonsApi get_suggested_addons GET /addons/suggestions Get suggested add-ons to be installed.
AddonsApi install_addon_by_id POST /addons/{addonId}/install Installs the add-on with the given ID.
AddonsApi install_addon_from_url POST /addons/url/{url}/install Installs the add-on from the given URL.
AddonsApi uninstall_addon POST /addons/{addonId}/uninstall Uninstalls the add-on with the given ID.
AddonsApi update_addon_configuration PUT /addons/{addonId}/config Updates an add-on configuration for given ID and returns the old configuration.
AudioApi get_audio_default_sink GET /audio/defaultsink Get the default sink if defined or the first available sink.
AudioApi get_audio_default_source GET /audio/defaultsource Get the default source if defined or the first available source.
AudioApi get_audio_sinks GET /audio/sinks Get the list of all sinks.
AudioApi get_audio_sources GET /audio/sources Get the list of all sources.
AuthApi delete_session POST /auth/logout Delete the session associated with a refresh token.
AuthApi get_api_tokens GET /auth/apitokens List the API tokens associated to the authenticated user.
AuthApi get_o_auth_token POST /auth/token Get access and refresh tokens.
AuthApi get_sessions_for_current_user GET /auth/sessions List the sessions associated to the authenticated user.
AuthApi remove_api_token DELETE /auth/apitokens/{name} Revoke a specified API token associated to the authenticated user.
ChannelTypesApi get_channel_type_by_uid GET /channel-types/{channelTypeUID} Gets channel type by UID.
ChannelTypesApi get_channel_types GET /channel-types Gets all available channel types.
ChannelTypesApi get_linkable_item_types_by_channel_type_uid GET /channel-types/{channelTypeUID}/linkableItemTypes Gets the item types the given trigger channel type UID can be linked to.
ConfigDescriptionsApi get_config_description_by_uri GET /config-descriptions/{uri} Gets a config description by URI.
ConfigDescriptionsApi get_config_descriptions GET /config-descriptions Gets all available config descriptions.
DiscoveryApi get_bindings_with_discovery_support GET /discovery Gets all bindings that support discovery.
DiscoveryApi get_discovery_services_info GET /discovery/bindings/{bindingId}/info Gets information about the discovery services for a binding.
DiscoveryApi scan POST /discovery/bindings/{bindingId}/scan Starts asynchronous discovery process for a binding and returns the timeout in seconds of the discovery operation.
EventsApi get_events GET /events Get all events.
EventsApi init_new_state_tacker GET /events/states Initiates a new item state tracker connection
EventsApi update_item_list_for_state_updates POST /events/states/{connectionId} Changes the list of items a SSE connection will receive state updates to.
HabpanelApi get_gallery_widget_list GET /habpanel/gallery/{galleryName}/widgets Gets the list of widget gallery items.
HabpanelApi get_gallery_widgets_item GET /habpanel/gallery/{galleryName}/widgets/{id} Gets the details about a widget gallery item.
IconsetsApi get_icon_sets GET /iconsets Gets all icon sets.
InboxApi approve_inbox_item_by_id POST /inbox/{thingUID}/approve Approves the discovery result by adding the thing to the registry.
InboxApi flag_inbox_item_as_ignored POST /inbox/{thingUID}/ignore Flags a discovery result as ignored for further processing.
InboxApi get_discovered_inbox_items GET /inbox Get all discovered things.
InboxApi remove_ignore_flag_on_inbox_item POST /inbox/{thingUID}/unignore Removes ignore flag from a discovery result.
InboxApi remove_item_from_inbox DELETE /inbox/{thingUID} Removes the discovery result from the inbox.
ItemsApi add_member_to_group_item PUT /items/{itemName}/members/{memberItemName} Adds a new member to a group item.
ItemsApi add_metadata_to_item PUT /items/{itemname}/metadata/{namespace} Adds metadata to an item.
ItemsApi add_or_update_item_in_registry PUT /items/{itemname} Adds a new item to the registry or updates the existing item.
ItemsApi add_or_update_items_in_registry PUT /items Adds a list of items to the registry or updates the existing items.
ItemsApi add_tag_to_item PUT /items/{itemname}/tags/{tag} Adds a tag to an item.
ItemsApi get_item_by_name GET /items/{itemname} Gets a single item.
ItemsApi get_item_namespaces GET /items/{itemname}/metadata/namespaces Gets the namespace of an item.
ItemsApi get_item_state1 GET /items/{itemname}/state Gets the state of an item.
ItemsApi get_items GET /items Get all available items.
ItemsApi get_semantic_item GET /items/{itemName}/semantic/{semanticClass} Gets the item which defines the requested semantics of an item.
ItemsApi purge_database POST /items/metadata/purge Remove unused/orphaned metadata.
ItemsApi remove_item_from_registry DELETE /items/{itemname} Removes an item from the registry.
ItemsApi remove_member_from_group_item DELETE /items/{itemName}/members/{memberItemName} Removes an existing member from a group item.
ItemsApi remove_metadata_from_item DELETE /items/{itemname}/metadata/{namespace} Removes metadata from an item.
ItemsApi remove_tag_from_item DELETE /items/{itemname}/tags/{tag} Removes a tag from an item.
ItemsApi send_item_command POST /items/{itemname} Sends a command to an item.
ItemsApi update_item_state PUT /items/{itemname}/state Updates the state of an item.
LinksApi get_item_link GET /links/{itemName}/{channelUID} Retrieves an individual link.
LinksApi get_item_links GET /links Gets all available links.
LinksApi get_orphan_links GET /links/orphans Get orphan links between items and broken/non-existent thing channels
LinksApi link_item_to_channel PUT /links/{itemName}/{channelUID} Links an item to a channel.
LinksApi purge_database1 POST /links/purge Remove unused/orphaned links.
LinksApi remove_all_links_for_object DELETE /links/{object} Delete all links that refer to an item or thing.
LinksApi unlink_item_from_channel DELETE /links/{itemName}/{channelUID} Unlinks an item from a channel.
LoggingApi get_logger GET /logging/{loggerName} Get a single logger.
LoggingApi get_logger1 GET /logging Get all loggers
LoggingApi put_logger PUT /logging/{loggerName} Modify or add logger
LoggingApi remove_logger DELETE /logging/{loggerName} Remove a single logger.
ModuleTypesApi get_module_type_by_id GET /module-types/{moduleTypeUID} Gets a module type corresponding to the given UID.
ModuleTypesApi get_module_types GET /module-types Get all available module types.
PersistenceApi delete_item_from_persistence_service DELETE /persistence/items/{itemname} Deletes item persistence data from a specific persistence service in a given time range.
PersistenceApi delete_persistence_service_configuration DELETE /persistence/{serviceId} Deletes a persistence service configuration.
PersistenceApi get_item_data_from_persistence_service GET /persistence/items/{itemname} Gets item persistence data from the persistence service.
PersistenceApi get_items_for_persistence_service GET /persistence/items Gets a list of items available via a specific persistence service.
PersistenceApi get_persistence_service_configuration GET /persistence/{serviceId} Gets a persistence service configuration.
PersistenceApi get_persistence_services GET /persistence Gets a list of persistence services.
PersistenceApi put_persistence_service_configuration PUT /persistence/{serviceId} Sets a persistence service configuration.
PersistenceApi store_item_data_in_persistence_service PUT /persistence/items/{itemname} Stores item persistence data into the persistence service.
ProfileTypesApi get_profile_types GET /profile-types Gets all available profile types.
RootApi get_root GET / Gets information about the runtime, the API version and links to resources.
RulesApi create_rule POST /rules Creates a rule.
RulesApi delete_rule DELETE /rules/{ruleUID} Removes an existing rule corresponding to the given UID.
RulesApi enable_rule POST /rules/{ruleUID}/enable Sets the rule enabled status.
RulesApi get_rule_actions GET /rules/{ruleUID}/actions Gets the rule actions.
RulesApi get_rule_by_id GET /rules/{ruleUID} Gets the rule corresponding to the given UID.
RulesApi get_rule_conditions GET /rules/{ruleUID}/conditions Gets the rule conditions.
RulesApi get_rule_configuration GET /rules/{ruleUID}/config Gets the rule configuration values.
RulesApi get_rule_module_by_id GET /rules/{ruleUID}/{moduleCategory}/{id} Gets the rule's module corresponding to the given Category and ID.
RulesApi get_rule_module_config GET /rules/{ruleUID}/{moduleCategory}/{id}/config Gets the module's configuration.
RulesApi get_rule_module_config_parameter GET /rules/{ruleUID}/{moduleCategory}/{id}/config/{param} Gets the module's configuration parameter.
RulesApi get_rule_triggers GET /rules/{ruleUID}/triggers Gets the rule triggers.
RulesApi get_rules GET /rules Get available rules, optionally filtered by tags and/or prefix.
RulesApi get_schedule_rule_simulations GET /rules/schedule/simulations Simulates the executions of rules filtered by tag 'Schedule' within the given times.
RulesApi run_rule_now1 POST /rules/{ruleUID}/runnow Executes actions of the rule.
RulesApi set_rule_module_config_parameter PUT /rules/{ruleUID}/{moduleCategory}/{id}/config/{param} Sets the module's configuration parameter value.
RulesApi update_rule PUT /rules/{ruleUID} Updates an existing rule corresponding to the given UID.
RulesApi update_rule_configuration PUT /rules/{ruleUID}/config Sets the rule configuration values.
ServicesApi delete_service_config DELETE /services/{serviceId}/config Deletes a service configuration for given service ID and returns the old configuration.
ServicesApi get_service_config GET /services/{serviceId}/config Get service configuration for given service ID.
ServicesApi get_service_context GET /services/{serviceId}/contexts Get existing multiple context service configurations for the given factory PID.
ServicesApi get_services GET /services Get all configurable services.
ServicesApi get_services_by_id GET /services/{serviceId} Get configurable service for given service ID.
ServicesApi update_service_config PUT /services/{serviceId}/config Updates a service configuration for given service ID and returns the old configuration.
SitemapsApi create_sitemap_event_subscription POST /sitemaps/events/subscribe Creates a sitemap event subscription.
SitemapsApi get_sitemap_by_name GET /sitemaps/{sitemapname} Get sitemap by name.
SitemapsApi get_sitemap_events GET /sitemaps/events/{subscriptionid}/* Get sitemap events for a whole sitemap. Not recommended due to potentially high traffic.
SitemapsApi get_sitemap_events1 GET /sitemaps/events/{subscriptionid} Get sitemap events.
SitemapsApi get_sitemaps GET /sitemaps Get all available sitemaps.
SitemapsApi poll_data_for_page GET /sitemaps/{sitemapname}/{pageid} Polls the data for one page of a sitemap.
SitemapsApi poll_data_for_sitemap GET /sitemaps/{sitemapname}/* Polls the data for a whole sitemap. Not recommended due to potentially high traffic.
SysteminfoApi get_system_information GET /systeminfo Gets information about the system.
SysteminfoApi get_uo_m_information GET /systeminfo/uom Get all supported dimensions and their system units.
TagsApi create_semantic_tag POST /tags Creates a new semantic tag and adds it to the registry.
TagsApi get_semantic_tag_and_sub_tags GET /tags/{tagId} Gets a semantic tag and its sub tags.
TagsApi get_semantic_tags GET /tags Get all available semantic tags.
TagsApi remove_semantic_tag DELETE /tags/{tagId} Removes a semantic tag and its sub tags from the registry.
TagsApi update_semantic_tag PUT /tags/{tagId} Updates a semantic tag.
TemplatesApi get_template_by_id GET /templates/{templateUID} Gets a template corresponding to the given UID.
TemplatesApi get_templates GET /templates Get all available templates.
ThingTypesApi get_thing_type_by_id GET /thing-types/{thingTypeUID} Gets thing type by UID.
ThingTypesApi get_thing_types GET /thing-types Gets all available thing types without config description, channels and properties.
ThingsApi create_thing_in_registry POST /things Creates a new thing and adds it to the registry.
ThingsApi enable_thing PUT /things/{thingUID}/enable Sets the thing enabled status.
ThingsApi get_available_firmwares_for_thing GET /things/{thingUID}/firmwares Get all available firmwares for provided thing UID
ThingsApi get_thing_by_id GET /things/{thingUID} Gets thing by UID.
ThingsApi get_thing_config_status GET /things/{thingUID}/config/status Gets thing config status.
ThingsApi get_thing_firmware_status GET /things/{thingUID}/firmware/status Gets thing's firmware status.
ThingsApi get_thing_status GET /things/{thingUID}/status Gets thing status.
ThingsApi get_things GET /things Get all available things.
ThingsApi remove_thing_by_id DELETE /things/{thingUID} Removes a thing from the registry. Set 'force' to true if you want the thing to be removed immediately.
ThingsApi update_thing PUT /things/{thingUID} Updates a thing.
ThingsApi update_thing_config PUT /things/{thingUID}/config Updates thing's configuration.
ThingsApi update_thing_firmware PUT /things/{thingUID}/firmware/{firmwareVersion} Update thing firmware.
TransformationsApi delete_transformation DELETE /transformations/{uid} Get a single transformation
TransformationsApi get_transformation GET /transformations/{uid} Get a single transformation
TransformationsApi get_transformation_services GET /transformations/services Get all transformation services
TransformationsApi get_transformations GET /transformations Get a list of all transformations
TransformationsApi put_transformation PUT /transformations/{uid} Put a single transformation
UiApi add_ui_component_to_namespace POST /ui/components/{namespace} Add a UI component in the specified namespace.
UiApi get_registered_ui_components_in_namespace GET /ui/components/{namespace} Get all registered UI components in the specified namespace.
UiApi get_ui_component_in_namespace GET /ui/components/{namespace}/{componentUID} Get a specific UI component in the specified namespace.
UiApi get_ui_tiles GET /ui/tiles Get all registered UI tiles.
UiApi remove_ui_component_from_namespace DELETE /ui/components/{namespace}/{componentUID} Remove a specific UI component in the specified namespace.
UiApi update_ui_component_in_namespace PUT /ui/components/{namespace}/{componentUID} Update a specific UI component in the specified namespace.
UuidApi get_uuid GET /uuid A unified unique id.
VoiceApi get_default_voice GET /voice/defaultvoice Gets the default voice.
VoiceApi get_voice_interpreter_by_uid GET /voice/interpreters/{id} Gets a single interpreter.
VoiceApi get_voice_interpreters GET /voice/interpreters Get the list of all interpreters.
VoiceApi get_voices GET /voice/voices Get the list of all voices.
VoiceApi interpret_text POST /voice/interpreters/{ids} Sends a text to a given human language interpreter(s).
VoiceApi interpret_text_by_default_interpreter POST /voice/interpreters Sends a text to the default human language interpreter.
VoiceApi listen_and_answer POST /voice/listenandanswer Executes a simple dialog sequence without keyword spotting for a given audio source.
VoiceApi start_dialog POST /voice/dialog/start Start dialog processing for a given audio source.
VoiceApi stop_dialog POST /voice/dialog/stop Stop dialog processing for a given audio source.
VoiceApi text_to_speech POST /voice/say Speaks a given text with a given voice through the given audio sink.

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~5–16MB
~205K SLoC