Get device logs
GET
/api/v1/devices/{id}/logs
const url = 'http://localhost:3000/api/v1/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/logs?severity=DEBUG&limit=100&before=2026-03-17T12%3A00%3A00Z&source=my-container';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/logs?severity=DEBUG&limit=100&before=2026-03-17T12%3A00%3A00Z&source=my-container' \ --header 'X-API-Key: <X-API-Key>'Retrieves log entries for a device with cursor-based pagination, newest first.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Device UUID
Query Parameters
Section titled “Query Parameters ” severity
string
Filter by severity level
limit
number
Maximum number of log entries to return
before
string
Example
2026-03-17T12:00:00ZCursor for pagination (timestamp of last entry)
source
string
Example
my-containerFilter by log source (container name, service, or “system”)
Responses
Section titled “ Responses ”Log entries retrieved successfully
Media type application/json
object
data
required
Array<object>
object
id
required
Log entry ID
string
deviceId
required
Device ID
string
timestamp
required
Timestamp
string
severity
required
Severity level
string
body
required
Log message body
string
source
Log source (container name, service, or system)
object
attributes
Structured attributes
object
hasMore
required
Whether there are more entries before the cursor
boolean
Example
{ "data": [ { "severity": "DEBUG" } ]}Forbidden — caller lacks required permission
Device not found