DataRetention

class matterapi.endpoints.async_api.DataRetentionApi(client: matterapi.client.base.BaseClient, skip_response_parsing: bool = False)

Endpoint for getting data retention policy settings.

async add_channels_to_retention_policy(policy_id: str, *, json_body: Union[List[str], Dict]) matterapi.models.StatusOK

Add channels to a granular data retention policy

Adds channels to a granular data retention policy.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

AddChannelsToRetentionPolicy

async add_teams_to_retention_policy(policy_id: str, *, json_body: Union[List[str], Dict]) matterapi.models.StatusOK

Add teams to a granular data retention policy

Adds teams to a granular data retention policy.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

AddTeamsToRetentionPolicy

async create_data_retention_policy(*, json_body: Union[matterapi.models.DataRetentionPolicyCreate, Dict]) matterapi.models.DataRetentionPolicyWithTeamAndChannelCounts

Create a new granular data retention policy

Creates a new granular data retention policy with the specified display name and post duration.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

CreateDataRetentionPolicy

async delete_data_retention_policy(policy_id: str) matterapi.models.StatusOK

Delete a granular data retention policy

Deletes a granular data retention policy.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

DeleteDataRetentionPolicy

async get_channel_policies_for_user(user_id: str, *, page: Optional[int] = 0, per_page: Optional[int] = 60) matterapi.models.RetentionPolicyForChannelList

Get the policies which are applied to a user’s channels

Gets the policies which are applied to the all of the channels to which a user belongs.

##### License Requires an E20 license.

Permissions:

Must be logged in as the user or have the manage_system permission.

Minimum Server Version:

5.35

Api Reference:

GetChannelPoliciesForUser

async get_channels_for_retention_policy(policy_id: str, *, page: Optional[int] = 0, per_page: Optional[int] = 60) matterapi.models.ChannelListWithTeamData

Get the channels for a granular data retention policy

Gets the channels to which a granular data retention policy is applied.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

GetChannelsForRetentionPolicy

async get_data_retention_policies(*, page: Optional[int] = 0, per_page: Optional[int] = 60) List[matterapi.models.DataRetentionPolicyWithTeamAndChannelCounts]

Get the granular data retention policies

Gets details about the granular (i.e. team or channel-specific) data retention policies from the server.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

GetDataRetentionPolicies

async get_data_retention_policies_count() matterapi.models.GetDataRetentionPoliciesCountResponse200

Get the number of granular data retention policies

Gets the number of granular (i.e. team or channel-specific) data retention policies from the server.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

GetDataRetentionPoliciesCount

async get_data_retention_policy() matterapi.models.GlobalDataRetentionPolicy

Get the global data retention policy

Gets the current global data retention policy details from the server, including what data should be purged and the cutoff times for each data type that should be purged.

##### License Requires an E20 license.

Permissions:

Requires an active session but no other permissions.

Minimum Server Version:

4.3

Api Reference:

GetDataRetentionPolicy

async get_data_retention_policy_by_id(policy_id: str) matterapi.models.DataRetentionPolicyWithTeamAndChannelCounts

Get a granular data retention policy

Gets details about a granular data retention policies by ID.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

GetDataRetentionPolicyByID

async get_team_policies_for_user(user_id: str, *, page: Optional[int] = 0, per_page: Optional[int] = 60) matterapi.models.RetentionPolicyForTeamList

Get the policies which are applied to a user’s teams

Gets the policies which are applied to the all of the teams to which a user belongs.

##### License Requires an E20 license.

Permissions:

Must be logged in as the user or have the manage_system permission.

Minimum Server Version:

5.35

Api Reference:

GetTeamPoliciesForUser

async get_teams_for_retention_policy(policy_id: str, *, page: Optional[int] = 0, per_page: Optional[int] = 60) List[matterapi.models.Team]

Get the teams for a granular data retention policy

Gets the teams to which a granular data retention policy is applied.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

GetTeamsForRetentionPolicy

async patch_data_retention_policy(policy_id: str, *, json_body: Union[matterapi.models.DataRetentionPolicyWithTeamAndChannelIds, Dict]) matterapi.models.DataRetentionPolicyWithTeamAndChannelCounts

Patch a granular data retention policy

Patches (i.e. replaces the fields of) a granular data retention policy. If any fields are omitted, they will not be changed.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

PatchDataRetentionPolicy

async remove_channels_from_retention_policy(policy_id: str, *, json_body: Union[List[str], Dict]) matterapi.models.StatusOK

Delete channels from a granular data retention policy

Delete channels from a granular data retention policy.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

RemoveChannelsFromRetentionPolicy

async remove_teams_from_retention_policy(policy_id: str, *, json_body: Union[List[str], Dict]) matterapi.models.StatusOK

Delete teams from a granular data retention policy

Delete teams from a granular data retention policy.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_write_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

RemoveTeamsFromRetentionPolicy

async search_channels_for_retention_policy(policy_id: str, *, json_body: Union[matterapi.models.SearchChannelsForRetentionPolicyJsonBody, Dict]) matterapi.models.ChannelListWithTeamData

Search for the channels in a granular data retention policy

Searches for the channels to which a granular data retention policy is applied.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

SearchChannelsForRetentionPolicy

async search_teams_for_retention_policy(policy_id: str, *, json_body: Union[matterapi.models.SearchTeamsForRetentionPolicyJsonBody, Dict]) List[matterapi.models.Team]

Search for the teams in a granular data retention policy

Searches for the teams to which a granular data retention policy is applied.

##### License Requires an E20 license.

Permissions:

Must have the sysconsole_read_compliance_data_retention permission.

Minimum Server Version:

5.35

Api Reference:

SearchTeamsForRetentionPolicy