Skip to content

List a device's logs

GET
/devices/{id}/logs
curl --request GET \
--url 'https://localhost:8080/api/v1/devices/example/logs?level=debug' \
--header 'Authorization: <Authorization>'

Returns the device’s log entries, newest first. level is the minimum level (warn returns warn and error). Page with next_before.

id
required
string

Device id (UUID)

level
string
Allowed values: debug info warn error

Minimum level

limit
integer

Page size (1-200, default 50)

before
integer

Return entries older than this id (from next_before)

OK

Media typeapplication/json
object
data
Array<object>
object
boot_count
integer
created_at
string
device_ts
string
id
integer
level
string
message
string
tag
string
uptime_ms
integer
next_before

NextBefore is the cursor for the next (older) page, or null at the end.

integer
Example
{
"data": [
{
"level": "warn",
"tag": "wifi"
}
]
}

Unauthorized

Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
Allowed values: body query path
name
string
instance
string
status
integer
title
string
type
string
Example
{
"detail": "One or more request values are invalid.",
"errors": [
{
"code": "required",
"detail": "name is required",
"in": "body",
"name": "name"
}
],
"instance": "/api/v1/devices",
"status": 422,
"title": "Request validation failed",
"type": "https://docs.air-iq.net/reference/errors/#validation-error"
}

Not Found

Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
Allowed values: body query path
name
string
instance
string
status
integer
title
string
type
string
Example
{
"detail": "One or more request values are invalid.",
"errors": [
{
"code": "required",
"detail": "name is required",
"in": "body",
"name": "name"
}
],
"instance": "/api/v1/devices",
"status": 422,
"title": "Request validation failed",
"type": "https://docs.air-iq.net/reference/errors/#validation-error"
}

Unprocessable Entity

Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
Allowed values: body query path
name
string
instance
string
status
integer
title
string
type
string
Example
{
"detail": "One or more request values are invalid.",
"errors": [
{
"code": "required",
"detail": "name is required",
"in": "body",
"name": "name"
}
],
"instance": "/api/v1/devices",
"status": 422,
"title": "Request validation failed",
"type": "https://docs.air-iq.net/reference/errors/#validation-error"
}

Internal Server Error

Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
Allowed values: body query path
name
string
instance
string
status
integer
title
string
type
string
Example
{
"detail": "One or more request values are invalid.",
"errors": [
{
"code": "required",
"detail": "name is required",
"in": "body",
"name": "name"
}
],
"instance": "/api/v1/devices",
"status": 422,
"title": "Request validation failed",
"type": "https://docs.air-iq.net/reference/errors/#validation-error"
}