Skip to content

Instantly share code, notes, and snippets.

@adurity
Last active December 27, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adurity/7271017 to your computer and use it in GitHub Desktop.
Save adurity/7271017 to your computer and use it in GitHub Desktop.
Describes protocol for communicating unique ID to server for App Ops study.

Protocol for ID submission

When participants open our App Ops launcher on their Android 4.3 phone, the launcher will notify our server. This will allow us to ensure that participants are using App Ops on a regular basis. This document describes the mechanism and format of the notification message.

Protocol

The message will be transmitted to our server via an HTTP or HTTPS POST request.

Request Format

The message will contain a JSON object with the hashed and salted identifier. A nominal request would be:

POST / HTTP/1.1
Host: <API hostname>
Accept: application/json
Content-Type: application/json
Content-Length: 

{"id": "8843d7f92416211de9ebb963ff4ce28125932878"}

Response Format

The server will respond to the message with an HTTP status code, typically 200. The response need not contain any data.

HTTP/1.1 200 OK
Date: <date of response>

If there was an error, the response code should be in the 4xx or 5xx range, but 500 is the most likely.

HTTP/1.1 500 INTERNAL SERVER ERROR
Date: <date of response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment