-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkonnected-custom-endpoint-openapi.yaml
90 lines (86 loc) · 2.28 KB
/
konnected-custom-endpoint-openapi.yaml
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
openapi: 3.1.0
info:
title: Custom Controller Endpoint API Spec
summary: API Specification for Implementing a Custom Endpoint Application to act as a Controller for Konnected devices
description: To
version: 1.0.0
termsOfService: https://konnected.io/terms
contact:
name: Konnected Support
url: https://help.konnected.io
email: [email protected]
servers:
- url: http://{localController}
description: Hostname or IP address of your custom endpoint application on the local network or internet.
variables:
localController:
default: my-app.local
paths:
/device/{deviceId}:
get:
summary: Get State
description: Return the state of a switch or actuator
parameters:
- in: path
name: deviceId
schema:
type: string
required: true
description: Unique twelve-character hex ID of the device (chipID or MAC)
- in: query
name: zone
schema:
type: string
description: Zone identifier to query state (if omitted, all binary sensor zones are returned).
put:
summary: Update State
description: Receive a state update from a Konnected zone
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/zone'
parameters:
- in: path
name: deviceId
schema:
type: string
required: true
description: Unique twelve-character hex ID of the device (chipID or MAC)
components:
schemas:
zone:
type: object
properties:
zone:
type: string
description: The zone identifier
enum:
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '10'
- '11'
- '12'
- 'out'
- 'alarm1'
- 'out1'
- 'alarm2_out2'
state:
type: integer
description: The current state of the zone (`1` = open/on; `0` = closed/off)
enum:
- '0'
- '1'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
security:
- bearerAuth: []