Device Logger
These endpoints are for devices to upload their logs to the cloud.
Endpoints
The Device Log Request object
- idstring
Unique ID of log request
- deviceIdinteger
ID of device associated with log request.
- projectIdinteger
ID of project associated with log request.
- status
Status of log request.
- tsstring| format is date-time
Creation timestamp of log request.
- contentTypestring
MIME type of file uploaded for this request.
- tokenstring
Request token sent to device.
- uploadIdstring
Unique ID assigned to an upload session.
- filenamestring
Filename of uploaded device log.
- urlstring
URL for downloading the stored device log.
Initiate Upload Process
Endpoint
post /deviceLogger/{token}
Description
Initiate the file upload for a log request. To upload a log file, the device must first initiate an upload and obtain pre-signed secure URL(s) for the actual file upload. After the upload is complete, the client must make another request to commit the upload. A device may call this endpoint again if it wishes to reset a previously initiated upload process.
Path Parameters
token
string
required
Authentication token that is passed to device by DDP
Request Body
filename
string
Filename of file to upload.
size
integer
required
Size of the whole file to upload.
contentType
string
required
MIME type of file to upload.
Response
- 201
Update Status of Device Log Request
Endpoint
patch /deviceLogger/{token}
Description
Allows device to update the status such as failure or no logs.
Path Parameters
token
string
required
Authentication token that is passed to device by DDP
Request Body
status
string
Log Request Status.
Response
- 204Status of request updated successfully.
Commit Upload Process
Endpoint
post /deviceLogger/{token}/uploads/{uploadId}
Description
Conclude the specified upload process. If the upload was done in multiple parts, the parts are combined into a single file.
Path Parameters
token
string
required
Authentication token that is passed to device by DDP
uploadId
string
required
Upload process ID
Response
- 200Device log file has been successfully saved.
Get Upload Process Status
Endpoint
get /deviceLogger/{token}/uploads/{uploadId}
Description
Get the status of an ongoing upload process.
Path Parameters
token
string
required
Authentication token that is passed to device by DDP
uploadId
string
required
Upload process ID
Response
- 200