Rust SDK
The OpenApp Rust SDK (openapp-sdk) is the official
async client built on openapp-sdk-core. Authentication, retries, and error mapping
match the other official SDKs.
Package & source
Section titled “Package & source”| Package registry | crates.io openapp-sdk |
| Source code | docs.rs (published crate) |
| Generated API reference | docs.rs |
| Issues | GitHub issues |
The public GitHub mirror does not include the Rust facade crate tree; browse the published crate on docs.rs or install from crates.io.
Install
Section titled “Install”[dependencies]openapp-sdk = "0.1"Requires Rust stable (MSRV is declared in the crate manifest on crates.io) and an OpenApp API key.
Minimal example
Section titled “Minimal example”use openapp_sdk::Client;
#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = Client::builder() .api_key(std::env::var("OPENAPP_API_KEY")?) .build()?;
let orgs = client.orgs().list().await?; println!("{orgs:?}"); Ok(())}Error handling
Section titled “Error handling”use openapp_sdk::{Client, SdkError};
async fn list_orgs(api_key: String) { let client = match Client::builder().api_key(api_key).build() { Ok(c) => c, Err(err) => { eprintln!("config/auth error: {err}"); return; } };
match client.orgs().list().await { Ok(orgs) => println!("{orgs:?}"), Err(SdkError::Auth(msg)) => eprintln!("auth error: {msg}"), Err(SdkError::Api(api)) => eprintln!("api error: {} {}", api.status, api.message), Err(other) => eprintln!("transport/sdk error: {other}"), }}Shared guides
Section titled “Shared guides”Cross-language topics (with Rust examples on each page):
- Authentication — API keys, base URLs, and client setup.
- Errors & retries — retry policy and error shapes.
- Organization context & pagination —
X-Organd list parameters. - Devices, Zones, Entities, Organizations, Users, Billing, Integrations, Scripting, and the rest of the SDK overview index.
HTTP contract: API reference · OpenAPI JSON