-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagents.http
59 lines (51 loc) · 1.44 KB
/
agents.http
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
### [Agents] List all IOSYS agents (read-only)
GET {{api-server}}/v2/agents/iosys HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Agents] Create a new IOSYS agent (read–write)
POST {{api-server}}/v2/agents/iosys HTTP/1.1
X-Api-Key: {{read-write-token}}
Content-Type: application/json
{
"assetId": 62682,
"description": "New IOSYS agent for East Plant",
"class": "iosys",
"enable": true,
"config": {
"ip": "192.168.0.10",
"port": 8080
}
}
### [Agents] Get agent by class and id with optional expansions (read-only)
GET {{api-server}}/v2/agents/iosys/336 HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Agents] Update an agent (read–write)
PUT {{api-server}}/v2/agents/iosys/336 HTTP/1.1
X-Api-Key: {{read-write-token}}
Content-Type: application/json
{
"assetId": 62682,
"description": "Updated IOSYS agent: now with enhanced monitoring",
"class": "iosys",
"enable": true,
"config": {
"ip": "192.168.0.10",
"port": 8080,
"monitoringInterval": 60
}
}
### [Agents] List devices for an agent with paging (read-only)
GET {{api-server}}/v2/agents/iosys/336/devices HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Agents] Create a new device for an agent (read–write)
POST {{api-server}}/v2/agents/iosys/336/devices HTTP/1.1
X-Api-Key: {{read-write-token}}
Content-Type: application/json
{
"enable": true,
"class": "iosys",
"certificate": "CERTIFICATE",
"key": "PRIVATE",
"port": 15,
"timeout": 30,
"reconnect": 10
}