Request Device Logs
POST/devices/{deviceId}/logRequests
Base URL: https://api.tinkermode.com
Request logs of a device to be uploaded.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user or service account who has read access to the device, or project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
deviceId | integer | Yes | Device ID |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
end | string | No | format: date-time | The end age filter of the logs. Logs older than this date are retrieved. The format follows RFC3339. |
prefixes | array<string> | No | Prefix patterns to filter which logs to retrieve. | |
start | string | No | format: date-time | The start age filter of the logs. Logs younger than this date are retrieved. The format follows RFC3339. |
Responses
201 Successfully submitted log request.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
contentType | string | No | MIME type of file uploaded for this request. | |
deviceId | integer | No | ID of device associated with log request. | |
filename | string | No | Filename of uploaded device log. | |
id | string | No | Unique ID of log request | |
projectId | integer | No | ID of project associated with log request. | |
status | unknown | No | one of: success, failure, requested, uploading, cancelled | Status of log request. |
token | string | No | Request token sent to device. | |
ts | string | No | format: date-time | Creation timestamp of log request. |
uploadId | string | No | Unique ID assigned to an upload session. | |
url | string | No | URL for downloading the stored device log. |
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |