-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmue-bridge.raml
131 lines (129 loc) · 3.19 KB
/
mue-bridge.raml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#%RAML 1.0
title: mue-bridge
version: v1
protocols:
- HTTP
baseUri: http://localhost:80/{version}
mediaType:
- application/xml
types:
light-state-change:
properties:
on:
type: boolean
bri:
type: integer
bri_inc:
type: integer
hue:
type: integer
hue_inc:
type: integer
sat:
type: integer
sat_inc:
type: integer
ct:
type: integer
ct_inc:
type: integer
xy:
type: object
xy_inc:
type: object
alert:
type: string
effect:
type: string
transitiontime: integer
light-state-response:
properties:
on: boolean
bri: integer
hue: integer
sat: integer
xy: object
alert: string
effect: string
colormode: string
reachable: boolean
light-attribute-change:
properties:
name: string
/description.xml:
get:
description: Get information about bridge
responses:
200:
body:
application/xml:
example: !include(examples/read-description-response.xml)
/api:
post:
description: Register a new user
/{username}:
/config:
get:
description: Read bridge configuration.
responses:
200:
body:
application/json:
example: !include(examples/read-config-response.json)
put:
description: Update bridge configuration.
responses:
200:
body:
application/json:
example: !include(examples/update-config-response.json)
/whitelist/{username}:
delete:
description: Remove username from whitelist of registered applications.
responses:
200:
body:
application/json:
example: !include(examples/remove-from-whitelist-response.json)
/lights:
get:
description: Get all lights on bridge
body:
multipart/form-data:
type: light-state
responses:
200:
body:
application/json:
example: !include(examples/read-lights-response.json)
/{number}:
description: Light ID
get:
description: Get information about a light
responses:
200:
body:
application/json:
example: !include(examples/read-light-response.json)
/state:
put:
description: Change state of light
/groups:
get:
/{number}:
description: Group ID (0 == group with all lights)
get:
description: Show group information. Values returned is just last state (!live)
responses:
200:
body:
application/json:
example: !include(examples/read-group-response.json)
/action:
put:
description: Change state of all lights in group
responses:
200:
body:
application/json:
example: !include(examples/update-group-response.json)