1 Reply Latest reply on Oct 19, 2016 9:08 AM by Jeff Shurtliff

    Filter by multi-word destination name with Cloud Analytics cURL command

    Jeff Shurtliff

      Hey everyone,

       

      I am trying to pull analytics for specific spaces in our environment using Cloud Analytics and the cURL command.

       

      My script seems to work fine when filtering by places with a single word (e.g. "Products", "Services", etc.) but nothing is produced when filtering by places with spaces in the name.  (e.g. "Customer Support", "Professional Services", etc.)

       

      Here is an example of the command I run that works fine:

      STARTDATE="2016-10-10"

      ENDDATE="2016-10-17"

      SESSION=$(curl -XPOST "https://api.jivesoftware.com/analytics/v1/auth/login?clientId=${CLIENTID}&clientSecret=${CLIENTSECRET}")

      curl -v -XGET "https://api.jivesoftware.com/analytics/v2/export/activity/csv?count=all&after=${STARTDATE}&before=${ENDDATE}&filter=place(Products)" -H "Authorization: ${SESSION}" > /tmp/analytics/products

       

      Here is an example of a similar command that doesn't produce any data.

      STARTDATE="2016-10-10"

      ENDDATE="2016-10-17"

      SESSION=$(curl -XPOST "https://api.jivesoftware.com/analytics/v1/auth/login?clientId=${CLIENTID}&clientSecret=${CLIENTSECRET}")

      curl -v -XGET "https://api.jivesoftware.com/analytics/v2/export/activity/csv?count=all&after=${STARTDATE}&before=${ENDDATE}&filter=place(Customer Support)" -H "Authorization: ${SESSION}" > /tmp/analytics/customerSupport

       

      Does anyone know what I'm doing wrong?

       

      Thanks!!

      Jeff