List users
Filter organization users and traverse cursor-based pages.
list_users takes a ListUsersQueryRequest and returns ListUsersResponse. Use its builder to keep filter construction explicit and type-safe.
let query = ListUsersQueryRequest::builder()
.limit(25)
.email("member@example.com")
.status(GetApiV1UsersRequestStatus::Suspended)
.build()?;
let page = client.list_users(&query, None).await?;
for user in &page.data {
println!("{}: {:?}", user.id, user.action_status);
}Signature and filters
async fn list_users(
&self,
request: &ListUsersQueryRequest,
options: Option<RequestOptions>,
) -> Result<ListUsersResponse, ApiError>The optional query fields are limit, starting_after, ending_before, client_id, email, typed status, and user. The status enum supports the API's compliant, suspended, and banned values. Cursor fields are mutually exclusive and require Insion user IDs.
Result handling
The response contains data: Vec<User> and has_more. A User includes IDs, optional profile data, protection, metadata, timestamps, optional action status/timestamp, and optional appeal URL. If has_more is true, issue another query with .starting_after(last_user.id.clone()) and retain the same non-cursor filters. Use Insion IDs from this response for Retrieve a user and Create an appeal.