-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSensor_API_Postman_Collection.json
More file actions
80 lines (80 loc) · 2 KB
/
Sensor_API_Postman_Collection.json
File metadata and controls
80 lines (80 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"info": {
"_postman_id": "sensor-api-collection",
"name": "Sensor Data API",
"description": "CodeIgniter 4 Sensor Data API Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Store Sensor Data",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"device_id\": \"sensor_01\",\n \"current\": 2.1\n}"
},
"url": {
"raw": "http://localhost:8080/api/sensor",
"protocol": "http",
"host": ["localhost"],
"port": "8080",
"path": ["api", "sensor"]
},
"description": "Store new sensor data in database"
},
"response": []
},
{
"name": "Get Latest Overall",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/api/sensor/latest",
"protocol": "http",
"host": ["localhost"],
"port": "8080",
"path": ["api", "sensor", "latest"]
},
"description": "Get the latest sensor data record overall"
},
"response": []
},
{
"name": "Get Latest by Device ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/api/sensor/latest/sensor_01",
"protocol": "http",
"host": ["localhost"],
"port": "8080",
"path": ["api", "sensor", "latest", "sensor_01"]
},
"description": "Get the latest sensor data for a specific device"
},
"response": []
}
],
"variable": [
{
"key": "base_url",
"value": "http://localhost:8080",
"type": "string"
},
{
"key": "device_id",
"value": "sensor_01",
"type": "string"
}
]
}