Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the iOS console logs and look for log messages that look like "Successfully called upload complete for upload ID 280dd6f4-6fb2-45b5-846a-9d582e30196b, check status at https://webservices-staging.sagebridge.org/api/v1/upload/280dd6f4-6fb2-45b5-846a-9d582e30196b/status).
  2. Using Poster, sign into Bridge using the same credentials used to log into the app. The request is:
    POST https://webservices-staging.sagebridge.org/api/v1/auth/signIn
    {
      "username":"YourUsername",
      "password":"YourPassword",
      "study":"studyId"
    }
    1. Current study IDs are asthma, breastcancer, cardiovascular, diabetes, parkinson. Note that these are different from the study names.
    2. If you have an existing session, you may need to sign out (GET https://webservices-staging.sagebridge.org/api/v1/auth/signOut) before you can sign in.
    3. Note that this URL points to the staging stack. If you need to test against Prod, the base URL is https://webservices.sagebridge.org/
  3. Take the URL from the logs in step 1 and either paste it into Poster or into the same browser session (with the same cookies). You should get a blob of JSON back, which will include a field saying "status":"succeeded" or "status":"validation_in_progress" or "status":"validation failed".
    1. If it says "status":"succeeded", chances are, everything is good. (See TODO below for future improvements done by the Bridge team.)
    2. If it says "status":"validation_in_progress", you need to wait a bit longer, since server-side upload validation is done asynchronously. If it takes longer than ~30 seconds, something is likely wrong with the server, and you should reach out to the Bridge server team with your upload ID.
    3. If it says "status":"validation_failed". The messages in the JSON blob should give you a hint as to what the error is. If you need additional support, reach out to the Bridge server team with your upload ID.
    4. There may be status messages even if the upload succeeded. These are generally not a problem, but if you see them a lot, feel free to reach out to the Bridge server team.
  4. Also in the upload status blob is the "record" blob, which contains a "data" blob with the data that the server has recorded. You should check this blob to make sure the data you sent is the data you recorded. Some fields in the data will just be guids. These are attachment IDs, used for large data blobs (like accelerometer data) or freeform text (like study feedback).
  5. If you're switching apps, or if you want to clean out your Bridge session, call sign out (GET https://webservices-staging.sagebridge.org/api/v1/auth/signOut). This can be done in Poster or in the browser, whichever one has the session cookie.

TODO: The server validation is lenient, so it won't fail the validation if there are missing or extra fields or files. This means, if a file name or field name changes, the server will return "status":"succeeded", but no data will be exported. This is a significant gap in testing. Bridge server team should create API to get the health data record from the upload ID. This will allow app developers to see the data as it will be exporter to Synapse, so if the data record is missing fields (or most likely, entirely blank) we can catch this early. JIRA item for this change.TODO: Build a web UI to get health data records from upload IDs. This will save engineers and QA from having to construct HTTP requests by hand. This may or may not serve as a basis for research participants (users) getting their own data back. JIRA item for this change.

...