REST API Design Examples: Checkpoint Recaps
REST API Design Examples: Checkpoint Recaps
Tip
Checkpoint: Resource Modeling
Checkpoint: Resource Modeling
You now know:
- A 500-thermostat fleet reporting every 30 seconds produces about 16.67 requests per second.
- Keeping resources as nouns lets
GET,PUT, and query filters carry the action without inventing verb-style URLs. - The same hierarchy can return current readings, setpoints, history, and clean
404 Not Founderrors without changing the API shape.
Tip
Checkpoint: Offline Devices
Checkpoint: Offline Devices
You now know:
- A tracker can be considered offline after 180 seconds without heartbeat, but that does not make the resource disappear.
200 OKfits cached location plus connectivity metadata;404is for unknown vehicles or missing data.503 Service Unavailableis reserved for cases where the service cannot fulfill the request and should usually include retry guidance.
Tip
Checkpoint: Status and Protocol Choices
Checkpoint: Status and Protocol Choices
You now know:
201 Createdbelongs to successful device registration, while200 OKbelongs to successful reads or cached stale data.- For the explicit minimal-header CoAP/UDP/IPv4/Ethernet example, 46 of 50 counted bytes are headers (92%); actual frames may include options, security, and more link overhead.
- CoAP fits constrained request-response sensors; MQTT fits publish-subscribe monitoring; HTTP is useful but expensive for tiny battery messages.
Technical boundaries. The checkpoints use a fleet average, a chosen heartbeat threshold, and an explicitly minimal packet example to explain API decisions and communication costs. Their figures stop describing the same case when reporting differs from 500 thermostats every 30 seconds, offline detection differs from 180 seconds, or packet counting includes options, security, and additional link overhead.