First, log into your Tidepool account.
- Using your keyboard, press Command + Option + J (Mac) or Control + Shift + J (Windows).
- Once you have opened the console, ensure that the "Console" tab at the top of the window is selected:
and press Enter/Return. A file called patientData.json will download to your computer.
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 macOS, open your Applications folder, then open the Utilities folder. Open the Terminal application.
On a PC:
Open CMD, also known as Command Prompt on your Windows computer.
After opening Terminal on your Mac or CMD on your Windows computer, type the following, replacing <firstname.lastname@example.org> with your email registered with Tidepool Web. Please also remove the "<" and ">".
curl -v -X POST -u <email@example.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
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 download to 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 firstname.lastname@example.org if you have any questions!