Skip to main content

Overview

The ExecutionContextListResponse struct represents the response returned when fetching a paginated list of AI execution contexts.

Definition

pub struct ExecutionContextListResponse {
    pub data: Vec<AiExecutionContext>,
    pub has_more: bool,
}

Fields

data
Vec<AiExecutionContext>
required
A vector containing the execution contexts for the current page.
has_more
bool
required
Indicates whether there are more execution contexts available beyond the current page.

Usage Example

use wacht::api::execution_context::*;

let options = ListExecutionContextsOptions {
    page: Some(1),
    per_page: Some(20),
    agent_id: Some("agent_123".to_string()),
    workflow_id: None,
};

let response = fetch_execution_contexts(Some(options)).await?;

println!("Found {} execution contexts", response.data.len());

if response.has_more {
    println!("More contexts available on next page");
}

for context in response.data {
    println!("Context: {}", context.id.unwrap_or_default());
    println!("  Agent: {}", context.agent_id.unwrap_or_default());
    println!("  Created: {}", context.created_at.unwrap_or_default());
}

See Also