Skip to content

Instantly share code, notes, and snippets.

@pbraswell
Created August 27, 2014 23:20
Show Gist options
  • Save pbraswell/4be4c3abacedbc19b30e to your computer and use it in GitHub Desktop.
Save pbraswell/4be4c3abacedbc19b30e to your computer and use it in GitHub Desktop.
Participant Summary API invocation
curl -u "SleepMed_Admin:czd*ua292" http://107.22.212.178/wasabi/participants/summary/1387
Notes:
You have to use your admin credentials for this invocation. You have to use the participant login, not the pid. You should see a response like the following:
Content-Length: 1398
Content-Type: application/json; charset=utf-8
Date: Wed, 27 Aug 2014 23:13:19 GMT
ETag: "91a10a4e45145774e8f56ac33ba4f046"
Server: Apache/2.2.22 (Ubuntu)
Set-Cookie: _rice_mc3_session=BAh7BzoMdXNlcl9pZGklOg9zZXNzaW9uX2lkIiUwMGUzMmVlMjQzZWQxZTE3YmY5OWU0NmQ5ODM0YjQxNg%3D%3D--5fb4f18f0ce1f268b21127f16a8d35c0ef5f8f47; path=/; HttpOnly
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.18
X-Runtime: 1510
{
"arise": "6:00 am",
"bedtime": "1:00 am",
"diary_alerts": "",
"id": 25,
"last_login_date": "2014-06-28T01:22:14+00:00",
"login": "1387",
"stats": {
"Behavior 1": {
"complete_datetimestring": "04/06/2014-15:17:07",
"isi": 17,
"num_diary_entries": 7,
"se": "65.7 %",
"sleep_window_duration": "5 hrs 40 mins",
"sol": "0 hrs 42 mins",
"waso": "1 hr 11 mins"
},
"Behavior 2": {
"complete_datetimestring": "04/20/2014-22:32:46",
"isi": 16,
"num_diary_entries": 14,
"se": "74.2 %",
"sleep_window_duration": "5 hrs 20 mins",
"sol": "0 hrs 15 mins",
"waso": "0 hrs 29 mins"
},
"Education": {
"complete_datetimestring": "05/14/2014-17:05:27",
"isi": 15,
"num_diary_entries": 9,
"se": "80.5 %",
"sleep_window_duration": "5 hrs 0 mins",
"sol": "0 hrs 16 mins",
"waso": "0 hrs 32 mins"
},
"Overview": {
"complete_datetimestring": "03/29/2014-20:30:38",
"isi": 23,
"num_diary_entries": null,
"se": "",
"sleep_window_duration": "",
"sol": "",
"waso": ""
},
"Post": {
"complete_datetimestring": null,
"isi": null,
"num_diary_entries": 12,
"se": null,
"sleep_window_duration": null,
"sol": null,
"waso": null
},
"Relapse": {
"complete_datetimestring": "06/01/2014-15:25:23",
"isi": 11,
"num_diary_entries": 10,
"se": "78.2 %",
"sleep_window_duration": "5 hrs 0 mins",
"sol": "0 hrs 11 mins",
"waso": "0 hrs 44 mins"
},
"Thoughts": {
"complete_datetimestring": "05/04/2014-22:05:25",
"isi": 13,
"num_diary_entries": 11,
"se": "81.1 %",
"sleep_window_duration": "5 hrs 0 mins",
"sol": "0 hrs 13 mins",
"waso": "0 hrs 13 mins"
}
},
"status": "success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment