2 Replies Latest reply on May 8, 2015 9:41 AM by jamesbennett

    DES

    jamesbennett

      I am a new user, so trying to get familiar with what is possible/impossible using the Data Export Service. I’m pulling analytic data successfully through
      Jive’s two different versions of the API call, but have found some major differences in the number of records as well as columns returned for the same date range.

      I’ve tried to construct the API calls as close as possible so I can compare apples to apples. For the examples below:

       

      https://api.jivesoftware.com/analytics/v2/export/activity/csv?count=1000000&after=2015-05-01T00:00:00.000&before=2015-05-06T00:00:00.000

       

      https://api.jivesoftware.com/analytics/v1/export/activity/csv/content?count=1000000&after=2015-05-01T00:00:00.000&before=2015-05-06T00:00:00.000

       

      version (V1) includes information about questions (i.e.resolved, assumed resolved, and helpful) while V2 does not. V2 includes many
      more types of activities, including logins (which are an important metric).There were 73 unique actions returned from V2 verses 41 for V1. When comparing
      the number of ‘View’ type activities, the difference in the number of records(given the date parameters in the API call example above) was 7,432 higher in
      the file returned for V2.  As far as the total number of records, V2 pulled over 26K more. My questions are:

       

      • Is there a way to get all records & columns with one API call? If the answer is no, is there a newer version on the way
        from Jive? If the answer to that is no, how can I optimize either/both API calls to make sure I’m getting all data?
      • I tried using the ‘Show-all’ filter, but it doesn’t seem to have any affect whether set to True or False. Is this filter actually functional?

       

      Thanks for any advice.

        • Re: DES

          In DES v1 csv we separated all events into four types. This turned out to be more limiting/confusing than useful, so for v2, the csv columns are more generic and we include all events.

          The reason we don't return all possible columns in a single api call is there is a potential for so many given our data that it would overflow excel. So we've made a standard set of default columns, and added the ability to add to that list whichever columns you need.

          You do this by using the additionalFields param, you just need the full json path to the field you're interested in. You can find that by getting the json of a question event (questions are thread type actionObjects where activity.actionObject.isQuestion is true)

          $ curl -XGET "https://api.jivesoftware.com/analytics/v2/export/activity?count=1&filter=match(activity.actionObject.isQuestion,true)" -H "Authorization: $SESSION"

          Once prettified, the event will look something like this:

           

          {

              "paging": {

                  "next": "http://api.jivesoftware.com/analytics/v2/export/activity?count=1&filter=match(activity.actionObject.isQuestion,true)",

                  "itemsPerPage": 1,

                  "totalCount": 1092,

                  "currentPage": 1,

                  "totalPages": 1092

              },

              "list": [

                  {

                      "name": "ACTIVITY_VIEW_THREAD",

                      "timestamp": 1428513341372,

                      "context": {

                          "web": {

                              "anon": "false",

                              "visible": "true",

                              "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",

                              "sessionId": "ef61788b815dc886716367b6260b1f79",

                              "userId": "1",

                              "external": "false",

                              "federated": "false",

                              "partner": "false",

                              "requestId": "e230e3f0-de12-11e4-84ce-7831c1d4a91a",

                              "appID": "web",

                              "userEmail": "admin@example.com",

                              "userType": "REGULAR",

                              "flowId": "e230e3f1-de12-11e4-84ce-7831c1d4a91a",

                              "username": "admin"

                          }

                      },

                      "payload": {

                         

                      },

                      "actorID": 1,

                      "actorType": 3,

                      "activityType": "View",

                      "actionObjectId": 1001,

                      "actionObjectType": 1,

                      "containerId": 1,

                      "containerType": 2020,

                      "activity": {

                          "actor": {

                              "objectType": "user",

                              "objectId": 1,

                              "objectHash": "300d434fe1b746964738a7da910a6eaccffa033c",

                              "extras": {

                                 

                              },

                              "tags": [

                                 

                              ],

                              "username": "admin",

                              "name": "Administrator",

                              "email": "admin@example.com",

                              "creationDate": 1427311478339,

                              "modificationDate": 1428513333048,

                              "profile": {

                                 

                              },

                              "enabled": true,

                              "lastLoggedIn": 1428513333041,

                              "lastProfileUpdate": 1427311478339,

                              "type": "REGULAR",

                              "federated": false,

                              "visible": true,

                              "status": "registered",

                              "url": "http://localhost:8080/people/admin"

                          },

                          "action": "View",

                          "actionObject": {

                              "objectType": "thread",

                              "objectId": 1001,

                              "objectHash": "d1a25844318c45aa5b196a47a71c01018d71c670",

                              "extras": {

                                 

                              },

                              "tags": [

                                 

                              ],

                              "subject": "asdf",

                              "creationDate": 1427325276434,

                              "modifiedDate": 1427746272564,

                              "author": {

                                  "objectType": "user",

                                  "objectId": 1,

                                  "extras": {

                                     

                                  },

                                  "tags": [

                                     

                                  ],

                                  "username": "admin",

                                  "name": "Administrator",

                                  "email": "admin@example.com",

                                  "creationDate": 1427311478339,

                                  "modificationDate": 1428513333048,

                                  "profile": {

                                     

                                  },

                                  "enabled": true,

                                  "lastLoggedIn": 1428513333041,

                                  "lastProfileUpdate": 1427311478339,

                                  "type": "REGULAR",

                                  "federated": false,

                                  "visible": true,

                                  "status": "registered",

                                  "url": "http://localhost:8080/people/admin"

                              },

                              "containerId": 1,

                              "containerType": "usercontainer",

                              "isVisibleToPartner": false,

                              "status": "PUBLISHED",

                              "url": "http://localhost:8080/thread/1001",

                              "fullPath": "/community_1/usercontainer_1",

                              "normalizedPath": "/usercontainer_1",

                              "isQuestion": true,

                              "questionStatus": "resolved",

                              "resolved": true,

                              "assumedResolved": false,

                              "open": false,

                              "questionCreationDate": 1427325276790,

                              "resolutionDate": 1427328048272,

                              "numHelpfulAnswers": 1,

                              "numReplies": 4

                          },

                          "activityTime": 1428513341372,

                          "destination": {

                              "objectType": "usercontainer",

                              "objectId": 1,

                              "objectHash": "8816139873b8caa25ebd585c956cbe5126a3cdca",

                              "extras": {

                                 

                              },

                              "tags": [

                                 

                              ],

                              "name": "Administrator",

                              "displayName": "admin",

                              "description": "Administrator",

                              "creationDate": 0,

                              "modificationDate": 0,

                              "url": "http://localhost:8080/people/admin",

                              "status": "ACTIVE",

                              "isVisibleToPartner": false,

                              "parentId": 1,

                              "parentType": "community",

                              "fullPath": "/community_1/usercontainer_1",

                              "normalizedPath": "/usercontainer_1"

                          }

                      }

                  }

              ]

          }

           

           

          From that you can see all the available data for these types of events. If you're not familiar with json, it defines the path to an object by listing outermost to innermost objects separated by '.'s. So if you want assumedResolved and questionStatus to be in your csv, you can use additionalFields=activity.actionObject.assumedResolved,activity.actionObject.questionStatus.

          $ curl -XGET "https://api.jivesoftware.com/analytics/v2/export/activity?filter=match(activity.actionObject.isQuestion,true)&additionalFields=activity.actionObject.assumedResolved,activity.actionObject.questionStatus"