# Upload new device logs as json Uploads a new device logs json to the user's account. The header must represent the MD5 hash of the json data content. Endpoint: POST /v1/users/{userId}/device_logs Version: 1.0 Security: sessionToken ## Path parameters: - `userId` (string, required) Tidepool User ID ## Header parameters: - `Digest` (string, required) Base64-encoded MD5 hash of the resource, per RFC 3230 Example: "md5=HUXZLQLMuI/KZ5KDcJPcOA==" - `X-Logs-Start-At-Time` (string, required) Starting time of device logs inside the uploaded json log Example: "2017-02-06T02:37:46Z" - `X-Logs-End-At-Time` (string, required) End time of device logs inside the uploaded json log Example: "2017-02-06T02:37:46Z" ## Request fields (application/json): - `type` (string, required) Enum: "send", "receive", "error", "delegate", "delegateResponse", "connection" - `managerIdentifier` (string, required) A string identifying the model of the device. The is a non-empty string that encodes the model of device. We endeavor to match each manufacturer's standard for how they represent model name in terms of casing, whether parts of the name are represented as one word or two, etc. Example: "Devicey McDeviceface" - `deviceIdentifier` (string, required) Globally unique to device and repeatable with each upload, e.g. device make and model with serial number Example: "MMT-1711:12345678" - `timestamp` (string, required) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z" - `message` (string, required) Example: "sent something ..." ## Response 201 fields (application/json): - `id` (string, required) Blob ID Example: "97a9fae8a19b4da58bb48dc90c9562c9" - `userId` (string, required) String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit [UUID v4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) - `digestMD5` (string, required) MD5 digest of the content per [RFC 1321](https://www.ietf.org/rfc/rfc1321.txt), encoded as base64 ([RFC 4648](https://www.ietf.org/rfc/rfc4648.txt)). Example: "HUXZLQLMuI/KZ5KDcJPcOA==" - `mediaType` (string, required) Enum: "application/json" - `size` (integer, required) Size of the binary blob, in bytes Example: 1024 - `createdTime` (string, required) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z" - `startAtTime` (string) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z" - `endAtTime` (string) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z" ## Response 400 fields (application/json): - `code` (integer, required) Example: 404 - `message` (string, required) Example: "Requested resources was not found" ## Response 401 fields (application/json): - `code` (integer, required) Example: 404 - `message` (string, required) Example: "Requested resources was not found" ## Response 403 fields (application/json): - `code` (integer, required) Example: 404 - `message` (string, required) Example: "Requested resources was not found" ## Response 404 fields (application/json): - `code` (integer, required) Example: 404 - `message` (string, required) Example: "Requested resources was not found"