Skip to main content

GroupsMembersResource

Struct GroupsMembersResource 

Source
pub struct GroupsMembersResource<'a> { /* private fields */ }
Expand description

client.groups().members()

Implementations§

Source§

impl<'a> GroupsMembersResource<'a>

Source

pub fn documents(&self) -> GroupsMembersDocumentsResource<'a>

Source

pub fn followups(&self) -> GroupsMembersFollowupsResource<'a>

Source

pub fn routines(&self) -> GroupsMembersRoutinesResource<'a>

Source

pub fn create_export( &self, group_id: impl Display, body: &GroupMemberExportCreate, ) -> Result<Vec<u8>>

Export visible group members with selected columns

POST /groups/{groupId}/members/export

Downloads the same membership scope as GET on this path, using an optional JSON config. Omitted/null/empty config uses the default columns; {template: allin} selects the full discovered catalog. For custom columns, send version 10 and ordered pinned/unpinned lists. person.id is always included, prepended when missing. Some person fields expand into multiple columns; pinned columns are frozen in XLSX. Unknown keys and malformed configurations are not reliably validated and may cause 500. Legacy version 9 is migrated internally but has known custom-column migration limitations; new clients should use version 10. The request is read-only and does not save the export configuration.

Use Self::create_export_with to pass query parameters.

§Example
let body = models::GroupMemberExportCreate::default();
let data = client.groups().members().create_export(42, &body)?;
std::fs::write("ergebnis.xlsx", &data)?;
Source

pub fn create_export_with( &self, group_id: impl Display, query: &PostGroupsIdMembersExportQuery, body: &GroupMemberExportCreate, ) -> Result<Vec<u8>>

Export visible group members with selected columns

Like Self::create_export, with query parameters.

POST /groups/{groupId}/members/export

Downloads the same membership scope as GET on this path, using an optional JSON config. Omitted/null/empty config uses the default columns; {template: allin} selects the full discovered catalog. For custom columns, send version 10 and ordered pinned/unpinned lists. person.id is always included, prepended when missing. Some person fields expand into multiple columns; pinned columns are frozen in XLSX. Unknown keys and malformed configurations are not reliably validated and may cause 500. Legacy version 9 is migrated internally but has known custom-column migration limitations; new clients should use version 10. The request is read-only and does not save the export configuration.

Source

pub fn delete( &self, group_id: impl Display, person_id: impl Display, ) -> Result<()>

Remove a person’s group membership

DELETE /groups/{groupId}/members/{personId}

Removes the membership linking groupId and personId. personId identifies the person, while data.id in membership responses identifies the membership record. The person record is retained. Viewing the group and its members is required, together with permission to delete members unless the current user is allowed to leave the group themselves. For an allowed self-service departure, autoAccept determines the outcome: true removes the membership immediately; false changes its status to to_delete (pending removal) and resets its role to the group type’s default role. After authorization, a missing or invisible membership is ignored and the endpoint still returns 204. A 204 response therefore does not guarantee that a membership was deleted.

§Example
client.groups().members().delete(42, 42)?;
Source

pub fn get( &self, group_id: impl Display, person_id: impl Display, ) -> Result<GroupMember>

Get a person’s group membership

GET /groups/{groupId}/members/{personId}

Returns the visible membership linking groupId and personId. personId is the person’s ID, not the membership record ID returned in data.id. The role and status describe this membership; they do not describe the person’s memberships in other groups. Comments, the end date and additional member fields are subject to field permissions. Returns 404 when the membership does not exist or is not visible to the current user.

§Example
let member = client.groups().members().get(42, 42)?;
println!("{}", member.id);
Source

pub fn get_export(&self, group_id: impl Display) -> Result<Vec<u8>>

Export visible group members with the default columns

GET /groups/{groupId}/members/export

Downloads visible memberships of this group as CSV or XLSX. Archived persons and members hidden by the current user’s access rules are excluded; all membership workflow statuses are eligible. Default columns include person ID and name, role, membership status, comment, registering person, membership dates, waiting-list position and accessible group-specific member fields. Missing member-field values are represented by their configured defaults. Headers and formatted values use the current language. There is no pagination or explicit sort parameter. CSV is UTF-8 with semicolon separators. Use POST on this path to select columns; query config is ignored. A scope with no visible members yields no member rows.

Use Self::get_export_with to pass query parameters.

§Example
let data = client.groups().members().get_export(42)?;
std::fs::write("ergebnis.xlsx", &data)?;
Source

pub fn get_export_with( &self, group_id: impl Display, query: &GetGroupsGroupIdMembersExportQuery, ) -> Result<Vec<u8>>

Export visible group members with the default columns

Like Self::get_export, with query parameters.

GET /groups/{groupId}/members/export

Downloads visible memberships of this group as CSV or XLSX. Archived persons and members hidden by the current user’s access rules are excluded; all membership workflow statuses are eligible. Default columns include person ID and name, role, membership status, comment, registering person, membership dates, waiting-list position and accessible group-specific member fields. Missing member-field values are represented by their configured defaults. Headers and formatted values use the current language. There is no pagination or explicit sort parameter. CSV is UTF-8 with semicolon separators. Use POST on this path to select columns; query config is ignored. A scope with no visible members yields no member rows.

Source

pub fn list(&self, group_id: impl Display) -> Result<Vec<GroupMember>>

List group memberships

GET /groups/{groupId}/members

Returns one page of visible memberships in this group. Each entry links a person to the group and includes their role and membership status. Memberships in all visible statuses are included unless group_member_statuses filters them. Filters are combined. Additional filters can use a group member field’s reference name or display name (=fieldValue), or a person-field key (person_=fieldValue). meta.count counts entries on the current page, meta.pagination.total counts filtered memberships across all pages, and meta.all counts visible memberships before applying filters. Additional person fields and enrichments must be requested explicitly.

Use Self::list_with to pass query parameters.

§Example
for member in client.groups().members().list(42)? {
    println!("{}", member.id);
}
Source

pub fn list_with( &self, group_id: impl Display, query: &GetGroupsIdMembersQuery, ) -> Result<Vec<GroupMember>>

List group memberships

Like Self::list, with query parameters.

GET /groups/{groupId}/members

Returns one page of visible memberships in this group. Each entry links a person to the group and includes their role and membership status. Memberships in all visible statuses are included unless group_member_statuses filters them. Filters are combined. Additional filters can use a group member field’s reference name or display name (=fieldValue), or a person-field key (person_=fieldValue). meta.count counts entries on the current page, meta.pagination.total counts filtered memberships across all pages, and meta.all counts visible memberships before applying filters. Additional person fields and enrichments must be requested explicitly.

Source

pub fn list_iter( &self, group_id: impl Display, query: &GetGroupsIdMembersQuery, ) -> Items<GroupMember> ⓘ

List group memberships

Like Self::list_with, but lazy: each page is fetched only when the iteration reaches it. Breaking off early saves the remaining requests.

Source

pub fn list_history( &self, group_id: impl Display, ) -> Result<Vec<GroupMemberHistoryEntry>>

List membership history with previous and current values

GET /groups/{groupId}/members/history

Returns legacy membership history for this group, newest entry ID first. Requires view group history or the internal +view history permission. member_id refers to the affected person and actor_id to the person who made the change. Change filters have precedence rather than being combined: new_role_id overrides new_status, which overrides new_fields/has_field_changed. The previous snapshot remains the actual linked predecessor even if it does not match the filters. To fetch older entries, pass the last returned id as offset_id; meta.count counts this batch, without a total or next cursor. Stored historical comments/field values are returned without individual person visibility or field security filtering.

Use Self::list_history_with to pass query parameters.

§Example
for history in client.groups().members().list_history(42)? {
    println!("{}", history.id);
}
Source

pub fn list_history_with( &self, group_id: impl Display, query: &GetGroupsGroupIdMembersHistoryQuery, ) -> Result<Vec<GroupMemberHistoryEntry>>

List membership history with previous and current values

Like Self::list_history, with query parameters.

GET /groups/{groupId}/members/history

Returns legacy membership history for this group, newest entry ID first. Requires view group history or the internal +view history permission. member_id refers to the affected person and actor_id to the person who made the change. Change filters have precedence rather than being combined: new_role_id overrides new_status, which overrides new_fields/has_field_changed. The previous snapshot remains the actual linked predecessor even if it does not match the filters. To fetch older entries, pass the last returned id as offset_id; meta.count counts this batch, without a total or next cursor. Stored historical comments/field values are returned without individual person visibility or field security filtering.

Source

pub fn list_meetings( &self, group_id: impl Display, person_id: impl Display, ) -> Result<Vec<GroupMemberMeeting>>

Get group meetings with attendance for one person

GET /groups/{groupId}/members/{personId}/meetings

Returns every meeting of the group, paired with the requested person’s attendance status. Requires permission to view the group and manage its meetings. Meetings without an attendance record are included with status null; canceled and completed meetings are also included. The endpoint does not verify that the person exists or is currently a group member. Results are not paginated and have no guaranteed order. Attendance statistics are not calculated.

§Example
for meeting in client.groups().members().list_meetings(42, 42)? {
    println!("{:?}", meeting.status);
}
Source

pub fn list_statistics( &self, group_id: impl Display, query: &GetGroupsGroupIdMembersStatisticsQuery, ) -> Result<Vec<GroupMemberStatistic>>

Get field statistics for selected group roles

GET /groups/{groupId}/members/statistics

Aggregates non-archived persons with a membership in this group and one of the requested group-type roles. Membership workflow status is not filtered. Requires permission to view the group and its members. Requested fields are included only if their security level is accessible; unknown or inaccessible fields are silently omitted. Person fields are selected by database field key, custom membership fields by numeric field ID. With no requested fields the result is empty. This is an unpaginated list; meta.count counts returned field statistics, not people. Person date fields return earliest/latest values including the corresponding person; requesting such a field when no non-null value exists currently reaches an unhandled empty-result path.

§Example
let query = GetGroupsGroupIdMembersStatisticsQuery {
    group_type_role_ids: Some(vec![8, 9]),
    ..Default::default()
};
for statistic in client.groups().members().list_statistics(42, &query)? {
    println!("{}", statistic.field_type);
}
Source

pub fn patch( &self, group_id: impl Display, person_id: impl Display, body: &MembershipUpdate, ) -> Result<GroupMember>

Update an existing group membership

PATCH /groups/{groupId}/members/{personId}

Updates the membership linking this group and person; it does not create one. Use PUT to add a person. Requires permission to view group members, to edit changed membership properties and to edit submitted custom fields at their security levels. Omitted properties are preserved. The current backend incompletely checks changes supplied as null. Changes run transactionally, update history and recalculate the person’s growth path. Waiting-list processing is suppressed: set status and position explicitly when both must change. Date-only and UTC start timestamps are accepted, while the response formats the start as a date. An empty object is accepted but still runs update/history processing.

§Example
let body = models::MembershipUpdate {
    comment: Some(Some("Available on weekends.".into())),
    ..Default::default()
};
let result = client.groups().members().patch(42, 42, &body)?;
println!("{}", result.id);
Source

pub fn update( &self, group_id: impl Display, person_id: impl Display, body: &MembershipCreate, ) -> Result<PutGroupsGroupIdMembersPersonIdData>

Add a person to a group

PUT /groups/{groupId}/members/{personId}

Creates a membership for the person identified in the path. Both creation and legacy updating return 200. Requires permission to view group members and add members; updating an existing membership additionally checks changed membership properties and custom-field security levels. Set only_add=true to reject existing memberships. Updating through PUT is deprecated in the backend; use PATCH for partial changes. The legacy update path clears omitted comments and end dates but preserves omitted status, role, start date and waiting-list position. Creation checks group capacity unless ignoreGroupFull is true; waiting-list capacity has a separate override. Changes update history, trigger membership events and recalculate the growth path. The response includes a legacy duplicate under data[“0”] and a top-level deprecation mapping; use the regular data properties.

§Example
let body = models::MembershipCreate {
    comment: Some(Some("Available on weekends.".into())),
    ..Default::default()
};
let result = client.groups().members().update(42, 42, &body)?;
println!("{}", result.id);

Trait Implementations§

Source§

impl<'a> Clone for GroupsMembersResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for GroupsMembersResource<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more