How I can get report data via API?

I'm just starting to play with modeanalytics, so don't hit me hard, pls. 
I didn't find a way to get report result data via API-query, only .csv and .pdf are available. 
This particular report may contain data or not. 
How can I query did report generate any data or not? Only by csv size comparison?


6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • forget it, found a workaround.
    sry for annoyance

    Reply Like
  • Hi Alexander,

    Could you share briefly what your workaround where like?




    Reply Like
  • Does anybody have any sample code?

    I can make a call to /api/xxx with no problem and it gets a JSON result. This implies my token auth is working.

    I'm getting 401 access errors, and my URI looks like:

    Code below.


    from urllib2 import Request, urlopen


    token = "xxxx"

    password = "yyyy"


    headers = {

      'Content-Type': 'application/json',

      'Accept': 'application/hal+json',

      'Authorization': "access_token %s" % (token)



    # report



    url = ''


    print headers

    print url


    request = Request(url, headers=headers)


    response_body = urlopen(request).read()

    print response_body

    Reply Like
  • Hey Ryan Choi , I responded to your question in this thread:

    Reply Like
  • Hi Leqi Long . Question for you - could you give an example of what the Headers object should look like, including Authorization? I have my token and password but can't figure out how to include them in the headers (i.e. what are the header names? do the token and password go into the headers separately? etc.). Thank you!

    Reply Like 1
  • Angela Ramirez  - did you find some solution to your query here? I am also trying to find a similar answer for importdata function in google sheet.

    Reply Like
Like Follow
  • Status Answered
  • 1 mth agoLast active
  • 6Replies
  • 1514Views
  • 6 Following