Skip to content

Returns aggregated activity timeline for a device

GET
/api/history/device/{mac}/timeline

Auto-generated from server.go. Handler: s.getDeviceTimeline.

mac
required
string
/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
Example
aa:bb:cc:dd:ee:ff

Full MAC address with colon or hyphen separators.

Successful response

Returns aggregated activity timeline for a device.

Schema hand-corrected in Session 10. The Session-6 lift sampled a row with only ACK / REQUEST in stats and mean as an integer; the handler actually emits an unbounded map[string]StatItem (DISCOVER, REQUEST, OFFER, ACK, NAK, RELEASE, INFORM… any DHCPv4/v6 message type), and mean is float64 not int. Switch stats.properties to additionalProperties and retype mean.

object
mac
required
string
time_range
required
object
from
required

RFC3339 string emitted by handler time.Time.Format; not time.Time.

string
to
required

RFC3339 string emitted by handler time.Time.Format; not time.Time.

string
buckets
required
Array<object>
object
time
required
string format: date-time
message_type
required
string
count
required
integer
stats
required

Per-message-type statistics over the time range. Keys are DHCP message type names (DISCOVER, OFFER, REQUEST, ACK, NAK, RELEASE, INFORM, DECLINE — and DHCPv6 SOLICIT, REQUEST, RENEW, etc). Whatever message types appeared in the window are present; others are omitted.

object
key
additional properties
object
min
required
integer
max
required
integer
mean
required

Float; computed as sum/count. The Session-6 lift sampled integer values and typed it as integer which is wrong.

number
sum
required
integer

Authentication is required or the supplied token is invalid.

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string

The requested resource was not found.

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string

Internal server error

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string