-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathactions.json
More file actions
54 lines (54 loc) · 2.34 KB
/
Copy pathactions.json
File metadata and controls
54 lines (54 loc) · 2.34 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
{
"plugin": {
"description": "Sends HTTP requests from a key: fire a POST at a webhook, or fetch a value with GET and show it on the key.",
"requirements": "Nothing. The target has to be reachable from this computer."
},
"actions": {
"PostRequest": {
"description": "Sends a POST request with a json body when the key is pressed. Use it for webhooks.",
"settings": {
"url": {
"type": "string",
"required": true,
"description": "The address to post to.",
"example": "https://example.com/api/webhook"
},
"json": {
"type": "string",
"default": "",
"description": "The request body, as json written into a text field - so it is a string containing json, not a json object.",
"example": "{\"action\": \"toggle\", \"id\": 3}"
}
}
},
"GetRequest": {
"description": "Sends a GET request, picks one value out of the json answer and shows it on the key. Set auto_fetch to turn it into a live readout.",
"settings": {
"url": {
"type": "string",
"required": true,
"description": "The address to fetch.",
"example": "https://api.example.com/status"
},
"headers": {
"type": "string",
"default": "{}",
"description": "Request headers, as a string containing json. Use it for API tokens.",
"example": "{\"Authorization\": \"Bearer abc123\"}"
},
"keys": {
"type": "string",
"default": "",
"description": "Which value of the json answer to show, as a path with periods between the keys. Empty shows the whole answer.",
"example": "data.temperature"
},
"auto_fetch": {
"type": "number",
"default": 0,
"description": "Fetch again every N seconds without pressing the key. 0 disables it.",
"example": 60
}
}
}
}
}