Tracking room, IM and MIM activity

It is possible to automates the process of tracking user activity in a stream. The following script will automate this process via a configuration file plus some work with the authentication keys, a Service Account and a StreamID. 

 

Note: This script uses Python, please install this before attempting to run the script

 

Note: This script takes an optional since argument (epoch timestamp) to search within a given timeframe. The script by default searches the last 7 days of stream activity

 

Note: This is an unsupported script which has been developed for users as a guideline to adapt accordingly

 

1. Install the Python SDK file (Figure 1):

mceclip0.png

Figure 1 Pip Command

 

2. The user is required to have the following items which are passed through to the script to ensure it is executed successfully:

  • RSA Key pair

  • config.yaml

3. The RSA Key pair must be obtained from your internal IT team as Symphony do not administer your pod. Alternatively, you may be able to create an RSA Key pair here 

 

4. The config.yaml is required in the following format

host: companyabc.symphony.com # your own pod host name
bot:
username: BOT-USERNAME # your service account username
privateKey:
path: /path/to/bot/rsa-private-key.pem # your bot RSA private key

 

Note: Where companyabc is the name of your pod

 

Note: Further information on BDK configuration can be found here

 

5. To execute the script, navigate to the working directory and run the following command:

 

python streamactivity.py --config /path/to/config.yaml --stream "stream_id"

 

Note: A stream/conversationID will need to be URL Safe Base64 encoded for the APIs in the script to function. Further information about this can be found here 

 

Note: The full script can be viewed and downloaded from repository located here

 

6. If a specific timeframe is required, the following command can be used accordingly:

 

python streamactivity.py --config /path/to/config.yaml --since epoch_timestamp --stream "stream_id"

 

7. Configuring logging is an optional step to run this script, but it can be useful for debugging purposes. If a user wishes to do this, uncomment lines 13-15 in streamactivity.py and create the following file and directory within the working directory (Figure 2):

 

mceclip1.png

Figure 2 File