Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Summary

Adds the ability to configure custom (granular) deletion policies for posts for specific teams and/or channels so that when the daily retention job runs it can selectively delete those posts by age based on the configuration.

...

Code Block
{
    "id": "m8zoumpj9pn9zexospoxi5dzoc",
    "display_name": "foo2",
    "post_duration": 365,
    "teams": ["z7rxbxbfb7yxdydxzi8pestath"],
      "channels": ["z7rxbxbfb7yxdydxzi8pestath"] }

DELETE /api/v4/retention_policies/:policy_id deletes a retention policy.

As a prerequisite one must delete all of the RetentionPoliciesChannels and RetentionPoliciesTeams first, otherwise the request is rejected.

GET /api/v4/retention_policies lists all retention policies, including associated teams and channels.

Code Block
{
    "policies": [         {"id": "z7rxbxbfb7yxdydxzi8pestath",
            "display_name": "foo",My Team 1"
        }
    ],
    "post_durationchannels": 2, [
        {
            "teamsid": ["z7rxbxbfb7yxdydxzi8pestath"],
            "channelsdisplay_name": ["z7rxbxbfb7yxdydxzi8pestath"]Off Topic",
            "team_display_name": "My Team 1"
  }     ], }
   "total_count": 1 ]
}

...

TBD: How much easier is it to just include the team and channel display names rather than just ids? For example:DELETE /api/v4/retention_policies/:policy_id deletes a retention policy.

As a prerequisite one must delete all of the RetentionPoliciesChannels and RetentionPoliciesTeams first, otherwise the request is rejected.

...

GET /api/v4/retention_policies lists all retention policies, including associated teams and channels.

Code Block
{
    "policies": [
        {
            "display_name": "foo",
            "post_duration": 2,
            "teams": [
                {
                    "id": "z7rxbxbfb7yxdydxzi8pestath",
                    "display_name": "My Team 1"
                }
            ],
            "channels": [
                {
                    "id": "z7rxbxbfb7yxdydxzi8pestath",
                    "display_name": "Off Topic",
                    "team_display_name": "My Team 1"
                }
            ]
        }
    ],
    "total_count": 1
}

...