List a device's logs
GET
/devices/{id}/logs
const url = 'https://localhost:8080/api/v1/devices/example/logs?level=debug';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Device id (UUID)
Query Parameters
Section titled “Query Parameters”level
string
Minimum level
limit
integer
Page size (1-200, default 50)
before
integer
Return entries older than this id (from next_before)
Responses
Section titled “Responses”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
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
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
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
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"}