3 comments

  • 0
    Avatar
    Scott Lawrence

    Hi Pingadi,

    Thank you for contributing to our community and raising this request.

    Can you help me understand your situation and what you are trying achieve?  

    The Klipfolio API call you are referring to was created to retrieve all the data from the data source identified.  This data will reflect the underlying definition of the data source when you created it in Klipfolio.  If your data source definition is set to pull back the data for the first month of the year, the Klipfolio API call you used will bring back that same data.   (This Klipfolio API call does not override the definition of the data source, so will not retrieve more data than was pulled into Klipfolio.)

    Regarding adding start/end date parameters to the Klipfolio API call, not all data sources customers create will have a date/time field in them and they often will have very different structures.  Without a known, consistent date/time field in a data source, there is nothing specific to associate a start/end date parameter to.   We do not have plans to add a start/end date parameter to this API call at the moment.

    Does your data source(as defined in the query when you created it in Klipfolio) have more data than you are receiving via the Klipfolio API?  (If so, can you share more information about the specific data source and calls you are making - perhaps in a support ticket - so we can investigate.)

    Looking forward to hearing more about your situation.

    Cheers,

    Scott.

     

  • 0
    Avatar
    Pingadi Limajaya

    Hi Scott,

    Currently I'm using the datasource instances of Google Analytics.
    But since I'm getting the datasource for "Google Analytics Metrics 2", the value retrieve is not the same as the value in my Dashboard (Users, Sessions, Pageviews).
    And the datasource for "Google Analytics Metrics (Prev)" value is the sames as my Dashboard for Target Users, Target Sessions, and Target Pageviews.

    I think it's weird that the data is not being the same value as the Dashboard value.
    So I recheck with data from "Google Analytics Website KPI 2" and the data retrieve is only for January 2017.
    And I think maybe it's the cause of my problem here.

    So I tried to recheck data from Google Analytics itself and filter it for 1 January 2017 - 31 January 2017, all Users, Sessions and Pageviews data match up with the one retrieve from datasource instances data for "Google Analytics Metrics 2".

    So probably current API for getting datasource instances of Google Analytics is only for the first month of the year or something.
    Are there any different approach for me to get those data?

    Thank you.

  • 0
    Avatar
    Meggan King

    Hi Pingadi -

    The data source you mentioned may be a dynamic data source. That means there will be many instance ids, each one pulling some of the data. Dynamic data sources are often used in our pre-built Google Analytics data sources. If you look at the data source in your library, you will notice it is missing the 'Download Data' option. You can change the /view in the URL to /debug_info and this will show you all the data source ids. To get all the data - more than just the first month of the year, you'll need to run your API query on each instance id. 

    Using the API, you can do this GET  https://app.klipfolio.com/api/1/datasources/bab1331400d1ecf8b9d39062a593cedd{id}?full=true

    You will see the list of instance ids returned. 

    For each instance id, you will run your GET  https://app.klipfolio.com/api/1.0/datasource-instances/{id}/data

    Hope this helps,

    Meggan

     

Please sign in to leave a comment.