diff options
author | Dave Arter <davea@mysociety.org> | 2020-09-15 17:29:23 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2020-09-16 12:53:34 +0100 |
commit | 2eb0d9b6ef151662dcd0a48f0fdf0023de6e672e (patch) | |
tree | ce61bc589470801f04304ee0cfabd600442591eb /docs | |
parent | afc51a21f03bf7356f9db9f79248c8be8bc36d2e (diff) |
[Docs] Add instructions for automatic export of dashboard CSV
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_includes/admin-tasks-content.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/_includes/admin-tasks-content.md b/docs/_includes/admin-tasks-content.md index 13ee4aa51..d0d5e4935 100644 --- a/docs/_includes/admin-tasks-content.md +++ b/docs/_includes/admin-tasks-content.md @@ -863,6 +863,23 @@ Android device or via an iOS device). These statistics can be downloaded as a CSV document, suitable for use in a spreadsheet program such as Excel or your own reporting tools. +#### Importing dashboard data automatically + +You may wish to automatically import data from the dashboard into your system on a regular basis. +Once you set your chosen criteria on the dashboard page, make a note of the URL of the "Reports" +or "Updates" link in the "Export as CSV" section. +Then you should generate an access token by visiting your account page and then "Security" and +generating a token from there. + +You can then specify that token either by appending it to the URL as an `access_token` parameter, +or including it as an `Authorization: Bearer <token>` HTTP header in the request from your system. + +The `export` must be present in the URL, and controls how the CSV is generated. +Reports can take some time to generate, so there are two different values for the parameter: + + - `export=1`: the response will wait until the file is ready and then provide it + - `export=2` (the default): you will immediately get a 202 HTTP response with a redirect to the location where the file will be once it has finished processing. This is more robust. + #### Heatmap Also accessible from the admin stats page is our heatmap. This can provide an |