Export your data

If at any time you feel a desire to download a copy of all of your data from Blip, there are two different ways to do it. 

1. Download a JSON from the Javascript Console

First, log in to your Blip account. 

Upon logging in, open the Javascript Console within Chrome.  To open the Console tab, do one of the following:

  1. Use the keyboard shortcut Command + Option + J (Mac) or Control + Shift + J (Windows/Linux).
  2. Select > More Tools > JavaScript Console .

Once you have opened the console, ensure that the "Console" tab at the top of the window is selected:

Then, type: 

downloadInputData()

Please note, if you use the auto-complete function as you type it will not include the parentheses which are necessary to download the JSON. After hitting enter, Chrome will initiate the download of a file entitled "blip-input.json". You can then navigate to this file and rename it whatever you please. In my example below, this is the 11th time I've downloaded a file with this title, hence the "(11)". 

2. Downloading all of your data from the Command-Line

This method downloads all of your data, not just the device-related data. 

On a Mac:

Open Terminal, either by searching for it with spotlight, or by navigating through the following: 

On OS X,  open your Applications folder, then open the Utilities folder. Open the Terminal application.

On a PC:

Running the queries on Terminal or Command Line. 

After you open Terminal or command line, type in the following, replacing <youremail@email.com> with your email registered with Blip. Please also remove the "<" and ">". 

 curl -v -X POST -u <youremail@email.com> https://api.tidepool.org/auth/login

After hitting enter, you will be prompted for your password. 

You will then receive a blurb similar to: 

HTTP/1.1 200 OK
access-control-allow-headers: authorization, content-type, x-tidepool-session-token
access-control-allow-methods: GET, POST, PUT
access-control-allow-origin: *
access-control-expose-headers: x-tidepool-session-token
access-control-max-age: 0
content-type: application/json
date: Wed, 10 Feb 2016 21:00:21 GMT
x-tidepool-session-token: eXYZyJhbGciOiJIUzI1NiaIsInR5cCI6IkwerwpXVCJ9.eyJkdXIiOjIuNTkyZSswNiwiZXhwIjox12345zMwMDIxLCJzdnIiOiJubyIsInVzciI6ImI0NTFhNmEwNDcifQ.WolTlCFxCIJjf5AbjabcdePqXztSxezUYzY-gwIJH-g
Content-Length: 170
Connection: keep-alive

{"emailVerified":true,"emails":["youremail@email.com"],"termsAccepted":"2016-01-12T21:31:05-08:00","userid":"0460512abc","username":"youremail@email.com"}

The two important parts here are the "x-tidepool-session-token" (eXYZy...IJH-g in this example) and the userid (0460512abc in this example)

You will then take your Session Token and userID and use them in a new query:

curl -s -X GET -H "x-tidepool-session-token: <your-session-token>" -H "Content-Type: application/json" 'https://api.tidepool.org/data/<your-user-id>' > data_download.json

Again, please replace <your-session-token> with your actual token string, and replace <your-user-id> with your userid from above. You can change "data_download.json" to any file name you like. 

After hitting enter, a file called data_download.json will appear on your computer. The easiest way to find this file is to search for it by name using your computer's search functionality.  

Please let us know via  support@tidepool.org if you have any questions! 


Still need help? Contact Us Contact Us