2 Replies Latest reply on Nov 19, 2014 1:46 PM by dirk.mcnealy

    Active community members


      What's the best way to extract active/enabled users by date to capture increase/decrease in accounts? I am using the Jive export API tool at https://api.jivesoftware.com/analytics/explorer to extract this information. Please recommend filters.


      Thank you in advance.

        • Re: Active community members
          Ryan Rutan

          Based on the Using the V2 Jive Data Export Service (Analytics), it may not be easy to track this on a given day...as the Data Export Service tracks activity temporally...not persistent data.  Your best bet would be to pull a fixed number from Jive, and then track the delta's each day.  My question though is if that "event" of "disabled/enabled" is available in DES.  Dirk McNealy John Hungerford Josh Richau?


          Depending on your solution needs, you might be able to use the Jive API to poll the People service and count the number of records accordingly.

          https://developers.jivesoftware.com/api/v3/cloud/rest/PersonService.html#getPeople(String, String, int, int, String, List<String>, String, String)


          Note the filters for "include-disabled" that might provide some ability to quickly count them based on your criteria. 


          Hope this helps =)

            • Re: Active community members

              The cloud analytics system captures a snapshot of the way things are at the time of an event, but does not capture what changed since the last one, so it's not going to be easy to use cloud analytics to see how many users were enabled in a given timeframe. It is possible though. (At the current time the web ui does not support queries involving the user.enabled field or return it in the csv, so you'd have to use the DES rest resource directly using the json output)


              When a user is enabled or disabled (or any other change is made to that user), it creates an ACTIVITY_UPDATE_USER event that is sent to the cloud analytics system. That event's action object is the user which was updated, in it's new state.


              If you find all ACTIVITY_UPDATE_USER events where the updated user is enabled in your timeframe:

              filter=action(ACTIVITY_UPDATE_USER)&filter=match(activity.actionObject.enabled,true)&before=<end of timeframe>&after=<start of timeframe>&count=all

              Then for each event in the result of that, find the previous update of the updated user:

              filter=action(ACTIVITY_UPDATE_USER)&filter=match(activity.actionObject.objectId,<userid from update event>)&before=<timestamp of update event -1>)&count=1

              If the activity.actionObject.enabled is false, then you can see that the update user event from the first query is when the user became enabled.

              If the activity.actionObject.enabled is true, then you can see that the user was already enabled.

              If there is no update user before this one, you need to find the create user event and see if the user is enabled at creation time:

              filter=action(ACTIVITY_CREATE_USER)&filter=match(activity.actionObject.objectId,<userid from update event>)