Project

General

Profile

Actions

REST APIs » History » Revision 11

« Previous | Revision 11/16 (diff) | Next »
Hammel, 19 Aug 2018 17:20


REST APIs

Monitor Node (imwww)

Resource Name HTTP Verbs HTTP Methods Returns Direction Description
Pair CREATE Pair POST /pair/iot UUID From IoT Node Pair an IoT node w/ Monitor
Pair CREATE Pair POST /pair/iot/<uuid> ACK From IoT Node Register an IoT node w/Monitor using UUID
Pair CREATE Pair POST /pair/jarvis/<uuid> ACK From Jarvis Pair a Jarvis node with Monitor
Monitor GET Monitor ID GET /monitor Monitor ID From Jarvis Monitor Identity information
Device GET Devices POST /devices Device list From Jarvis Get list of device IDs and descriptors
Device UPDATE Device PUT /device/<uuid> Device state From Jarvis Change device state with JSON
Device GET Device POST /device/<uuid> Device state From Jarvis Get Device state as JSON
Notes
  • Monitor identity includes location and possibly other descriptors that uniquely identify the monitor
  • POST is required for GET requests because the sender must identify themselves with a valid encryption key, which is sent in a JSON body that GET does not allow. This is because we are not using HTTPS but rather encrypting the requests and responses inside a JSON packet stored in the body of messages.

IoT Node (embedded in Arduino device code)

Resource Name HTTP Verbs HTTP Methods Returns Direction Description
Device UPDATE Device PUT /device/<uuid> Device state From Monitor Change device state with JSON
Device GET Device GET /device/<uuid> Device state From Monitor Get Device state as JSON
Device GET Register GET /register/<uuid> ACK From Monitor Provides UUID from monitor

Updated by Hammel over 6 years ago · 11 revisions