Expand description

The Rust SDK for Axiom.

If you’re just getting started, take a look at the Client. It contains all methods you’ll need to interact with the API.

Examples

use axiom_rs::{Client, Error};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Error> {
    let client = Client::new()?;

    // Create a dataset called my-dataset
    let dataset = client.datasets.create("my-dataset", "a description").await?;

    // Ingest one event
    client.datasets.ingest(&dataset.name, vec![
        json!({"foo": "bar"})
    ]).await?;

    // Query the dataset
    let query_res = client.datasets.apl_query(r#"['my-dataset']"#, None).await?;
    dbg!(query_res.matches);

    // Delete the dataset
    client.datasets.delete(dataset.name).await?;

    Ok(())
}

Re-exports

pub use client::Client;
pub use error::Error;

Modules

The top-level client for the Axiom API.

Manage datasets, ingest data and query it.

Error type definitions.

Manage virtual fields.