Skip to content
OAOpenAppPhysical Security as a Service
Login

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 registrycrates.io openapp-sdk
Source codedocs.rs (published crate)
Generated API referencedocs.rs
IssuesGitHub 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.

[dependencies]
openapp-sdk = "0.1"

Requires Rust stable (MSRV is declared in the crate manifest on crates.io) and an OpenApp API key.

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(())
}
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}"),
}
}

Cross-language topics (with Rust examples on each page):

HTTP contract: API reference · OpenAPI JSON