REST APIs » History » Version 13
Hammel, 27 Aug 2018 14:45
1 | 1 | Hammel | h1. REST APIs |
---|---|---|---|
2 | |||
3 | 9 | Hammel | h2. Monitor Node (imwww) |
4 | 1 | Hammel | |
5 | table{width:100%}. |
||
6 | 12 | Hammel | |_. Resource Name |_. HTTP Verbs |_. HTTP Methods |_. Returns |_. Direction |_. Description | |
7 | | Pair | CREATE Pair | POST /pair/iot | UUID | From IoT Node | Pair an IoT node w/ Monitor | |
||
8 | | Pair | CREATE Pair | POST /pair/iot/<uuid> | ACK | From IoT Node | Register an IoT node w/Monitor using UUID | |
||
9 | | Pair | CREATE Pair | POST /pair/jarvis/<uuid> | ACK | From Jarvis | Pair a Jarvis node with Monitor | |
||
10 | | Monitor | GET Monitor ID | GET /monitor | Monitor ID | From Jarvis | Monitor Identity information | |
||
11 | | Device | GET Devices | POST /devices | Device list | From Jarvis | Get list of device IDs and descriptors | |
||
12 | | Device | UPDATE Device | PUT /device/<uuid> | Device state | From Jarvis | Change device state with JSON | |
||
13 | | Device | GET Device | POST /device/<uuid> | Device state | From Jarvis | Get Device state as JSON | |
||
14 | 13 | Hammel | | Monitor | GET Query Eevices | GET /query/devices | Updates states | From monitor | Causes monitor to update its device state information; only valid if received from localhost | |
15 | 1 | Hammel | |
16 | 6 | Hammel | Notes |
17 | * Monitor identity includes location and possibly other descriptors that uniquely identify the monitor |
||
18 | 11 | Hammel | * 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. |
19 | 1 | Hammel | |
20 | h2. IoT Node (embedded in Arduino device code) |
||
21 | 7 | Hammel | |
22 | 1 | Hammel | table{width:100%}. |
23 | 9 | Hammel | |_. Resource Name |_. HTTP Verbs |_. HTTP Methods |_. Returns |_. Direction |_. Description | |
24 | | Device | UPDATE Device| PUT /device/<uuid> | Device state | From Monitor | Change device state with JSON | |
||
25 | | Device | GET Device | GET /device/<uuid> | Device state | From Monitor | Get Device state as JSON | |
||
26 | | Device | GET Register | GET /register/<uuid> | ACK | From Monitor | Provides UUID from monitor | |