tag:help.tenderapp.com,2008-11-12:/discussions/questions/16456-api-to-fetch-reportsTender: Discussion 2018-10-18T06:27:49Ztag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-18T19:06:14Z2017-04-18T19:06:14ZAPI to fetch reports<div><p>Hi Marco,</p>
<p>We do! Here's our KB on <a href="https://help.tenderapp.com/kb/api">API</a>.</p>
<p>Thanks,<br>
Brandi</p></div>branditag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-19T15:14:06Z2017-04-19T15:14:06ZAPI to fetch reports<div><p>Hi Brandi,<br>
can you point me to the exact page describing the Reports API? I can't<br>
really find it. I can just find some doc about the csv structure, but no<br>
information about Reports API.</p>
<p>Thank you,<br>
Marco</p></div>Marco Pracuccitag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-19T18:52:35Z2017-04-19T18:52:35ZAPI to fetch reports<div><p>Hi Marco,</p>
<p>What is it specifically that you are looking to do?</p></div>branditag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-20T05:04:17Z2017-04-20T05:04:17ZAPI to fetch reports<div><p>Hi Brandi,<br>
I would like some API to access the same exact data source used in the<br>
following pages to display reports:</p>
<ul>
<li><a href="https://help.spreaker.com/dashboard/reporting/stats">https://help.spreaker.com/dashboard/reporting/stats</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/comments">https://help.spreaker.com/dashboard/reporting/comments</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/density">https://help.spreaker.com/dashboard/reporting/density</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/activity">https://help.spreaker.com/dashboard/reporting/activity</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/supporter_history">https://help.spreaker.com/dashboard/reporting/supporter_history</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/supporter">https://help.spreaker.com/dashboard/reporting/supporter</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/response_histogram">https://help.spreaker.com/dashboard/reporting/response_histogram</a></li>
<li><a href="https://help.spreaker.com/dashboard/reporting/resolution_histogram">https://help.spreaker.com/dashboard/reporting/resolution_histogram</a></li>
</ul>
<p>Thank you,<br>
Marco</p></div>Marco Pracuccitag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-21T18:16:25Z2017-04-21T18:16:25ZAPI to fetch reports<div><p>Hi Marco,</p>
<p>Checking on this. Thanks for your patience.</p></div>branditag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-24T12:13:47Z2017-04-24T12:13:47ZAPI to fetch reports<div><p>Hi there,<br>
is there any news on this?</p>
<p>Marco</p></div>Marco Pracuccitag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-25T00:29:53Z2017-04-25T00:29:53ZAPI to fetch reports<div><p>Hey Marco, we don't have an API specifically for reports (no-one has ever asked for it, in five years). The report data is already in json, so you could probably script it pretty easily.</p></div>Courtenaytag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-25T11:36:08Z2017-04-25T11:36:08ZAPI to fetch reports<div><p>What do you mean the report data is already in Json? Can you point me to an<br>
URL? I've just seen csv export.</p>
<p>Marco</p></div>Marco Pracuccitag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-28T01:52:27Z2017-04-28T01:52:27ZAPI to fetch reports<div><p>If you have/are a web developer you can look at the urls in a reporting page, they make a simple request to the current url + ".js" and the result comes back in handy json. So you could script fetching those pages without too much difficulty. Rather than using the api you'd create a session by logging in then make the request to the page with the authenticity token for the request and the session id. It's fairly liberal in what it accepts for auth - basic auth, multipass encrypted token, or cookie with session key.</p></div>Courtenaytag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-28T01:53:07Z2017-04-28T01:53:07ZAPI to fetch reports<div><p>so e.g. on our site the page is <code>https://help.tenderapp.com/dashboard/reporting/stats</code> and it requests <code>https://help.tenderapp.com/dashboard/reporting/stats.js?type=week&start=Mon%20Apr%2024%202017%2000:00:00%20GMT+1200%20(NZST)&end=Sun%20Apr%2030%202017%2000:00:00%20GMT+1200%20(NZST)&authenticity_token=7fe441cdb7c89836b476bf185a78931c1a13f37a71b251d2d7598abe2feca81e</code></p></div>Courtenaytag:help.tenderapp.com,2008-11-12:Comment/423785312017-04-28T01:56:35Z2017-04-28T01:56:35ZAPI to fetch reports<div><p>This is not an officially supported API but the structure hasn't ever changed and there are no plans to change it, and I wrote it, so this is as close as we'll get to a reports API in the near future :) I know we could "just" add an endpoint that points to this same url from the api but the dev queue isn't LIFO!<br>
anyway, let me know if that works for you. I highly doubt that calling the JSON from the browser works (and would strongly recommend against it given you have to embed your credentials in the call) so this is a backend thing only.</p></div>Courtenaytag:help.tenderapp.com,2008-11-12:Comment/423785312017-05-02T17:35:11Z2017-05-02T17:35:11ZAPI to fetch reports<div><p>Thanks for all the good information. I'm good to continue working on this.</p>
<p>Marco</p>
<p>#resolve</p></div>Marco Pracucci