Giter VIP home page Giter VIP logo

webex-space-purge's Introduction

webex-space-purge

Overview

Purge all users from a space who have not posted a message since a specified cut-off date.

This can help pare down space membership when approaching the 5K limit.

Components used:

Tested using:

  • OS: Ubuntu Linux 22.04
  • Python: 3.10.4

Webex for Developers Site

Getting started

  • Install Python 3.10+

    On Windows, choose the option to add to PATH environment variable

  • The project was built/tested using Visual Studio Code

    On first launch of VS Code, install the Python plugin

  • Clone this repo to a directory on your PC:

    git clone https://github.com/CiscoDevNet/webex-space-purge.git
    cd webex-space-purge
  • (Optional) Create and activate a Python virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  • Dependency Installation:

    pip install -r requirements.txt
  • Open the project in VS Code:

    code .
  • Visit [https://developer.webex.com/docs/getting-started#accounts-and-authentication), login, and copy your personal access token

  • In Visual Studio Code:

    • Rename .env.example to .env and edit to configure

    • For absolute safety, line 105 in webex_space_purge.py is commented out:

      # api.memberships.delete(row['id'])

      Uncomment this line to arm the code for real purging!

    • Press F5 to run the application

      or

      python webex_space_purge.py
      
  • After messages/memberships are retrieved and the list of users to be purged is tallied, the target Webex user emails will be written to purge_list.txt.

    You may want to examine this file as a sanity check before proceeding.

  • Finally: you will be asked to type in CONFIRM before any users are actually purged.

Note: If something goes wrong, it should theoretically be possible to recreate purged the memberships based on the purge_list.txt file.

webex-space-purge's People

Contributors

dstaudt avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.