Overview

The WorkspaceListResponse struct represents the response returned when fetching a paginated list of workspaces.

Definition

pub struct WorkspaceListResponse {
    pub data: Vec<Workspace>,
    pub has_more: bool,
}

Fields

data
Vec<Workspace>
required
A vector containing the workspaces for the current page. Each workspace is represented by a Workspace struct.
has_more
bool
required
Indicates whether there are more workspaces available beyond the current page. Used for pagination.

Usage Example

use wacht::api::workspaces::*;

let options = ListWorkspacesOptions {
    page: Some(1),
    per_page: Some(20),
    search: None,
    organization_id: Some("org_123".to_string()),
};

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

println!("Found {} workspaces", response.data.len());
if response.has_more {
    println!("More workspaces available on next page");
}

for workspace in response.data {
    println!("Workspace: {} ({})", workspace.name, workspace.id);
}

See Also