-
Notifications
You must be signed in to change notification settings - Fork 0
/
http-api.json
102 lines (102 loc) · 2.32 KB
/
http-api.json
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[
{
"id": "62769e692c2449d6",
"type": "tab",
"label": "实现 http api 发送消息",
"disabled": false,
"info": "",
"env": []
},
{
"id": "8cd2c104209a4dcc",
"type": "http in",
"z": "62769e692c2449d6",
"name": "",
"url": "/send_message",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 270,
"y": 160,
"wires": [
[
"804be9b2391797cb"
]
]
},
{
"id": "804be9b2391797cb",
"type": "template",
"z": "62769e692c2449d6",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\n \"action\": \"send_message\",\n \"data\":{\n \"chat_id\": {{payload.chat_id}},\n \"text\": {{payload.text}}\n }\n}",
"output": "str",
"x": 470,
"y": 160,
"wires": [
[
"fc4f7a4a52d6847d",
"6e662fd9b7ebacc8"
]
]
},
{
"id": "fc4f7a4a52d6847d",
"type": "websocket out",
"z": "62769e692c2449d6",
"name": "发送",
"server": "d57d2813420fedfb",
"client": "",
"x": 770,
"y": 160,
"wires": []
},
{
"id": "2969489cd33a4ae3",
"type": "http response",
"z": "62769e692c2449d6",
"name": "",
"statusCode": "200",
"headers": {},
"x": 840,
"y": 240,
"wires": []
},
{
"id": "6e662fd9b7ebacc8",
"type": "change",
"z": "62769e692c2449d6",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"status_code\": 200}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 240,
"wires": [
[
"2969489cd33a4ae3"
]
]
},
{
"id": "d57d2813420fedfb",
"type": "websocket-listener",
"path": "/ws/example",
"wholemsg": "false"
}
]