How to export Hipchat Karma points

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

If you've been using the Hipchat Karma bot and are moving away of Hipchat Server/Data Center, you will lose track of all Karma points for your users. 

Solution

Top & bottom 10 Karma users

Send the following to a room with the Karma plugin installed: 

/karma :top users

/karma :bottom users

Export all Karma data

  1. Generate a user API token with the scope send_message
  2. Create a dummy Karma room
  3. Loop over all user mentions from the DB and send API calls from the server itself as follows:

    curl -d '{"message": "/karma @UserMention", "notify": false, "message_format": "text"}' -H 'Content-Type: application/json' 'https://<fqdn>/v2/room/<room_id>/message?auth_token=<auth_token>'

    * You will need to introduce a sleep of 3 seconds or so as you loop over the users to not exceed the API rate limiting of 100 calls per 5 minutes.

    * This will mention all users one by one.

  4. Once the run is done and all users Karma is returned, export the room history via View room history
  5. Parse the output and generate a list of all users and their Karma points


Last modified on Sep 27, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.