forked from openconnectivityfoundation/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.raml
executable file
·170 lines (153 loc) · 4.95 KB
/
scene.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#%RAML 0.8
title: Scene
version: v1-20160622
documentation:
- title: OCF Copyright
content: Copyright (c) 2016, 2017 Open Connectivity Foundation, Inc. All rights reserved.
- title: OCF License
content: !include LICENSE.md
- title: OCF Disclaimer
content: !include DISCLAIMER.md
schemas:
- Collection: !include schemas/oic.collection-schema.json
- SceneCollection: !include schemas/oic.sceneCollection-schema.json
- SceneCollectionUpdate: !include schemas/oic.sceneCollection-Update-schema.json
- SceneMember: !include schemas/oic.sceneMember-schema.json
traits:
- interface-all:
queryParameters:
if:
enum: ["oic.if.a", "oic.if.ll", "oic.if.baseline"]
- interface-update:
queryParameters:
if:
enum: ["oic.if.a"]
- interface-baseline:
queryParameters:
if:
enum: ["oic.if.baseline"]
/SceneListResURI:
description: |
Toplevel Scene resource.
This resource is a generic collection resource.
The rts value shall contain oic.wk.scenecollection resource types.
displayName: Scenes (Top level)
is: [ interface-baseline ]
get:
description: |
Provides the current list of web links pointing to scenes
responses:
200:
body:
application/json:
schema: Collection
example: |
{
"rt": ["oic.wk.scenelist"],
"n": "list of scene Collections",
"rts": ["oic.wk.scenecollection"],
"links": [
]
}
/SceneCollectionResURI:
description: |
Collection that models a set of Scenes.
This resource is a generic collection resource with additional parameters.
The rts value shall contain oic.scenemember resource types.
The additional parameters are
lastScene, this is the scene value last set by any OCF Client
sceneValues, this is the list of available scenes
lastScene shall be listed in sceneValues.
displayName: Scene Collections
get:
is: [ interface-baseline ]
description: |
Provides the current list of web links pointing to scenes
responses:
200:
body:
application/json:
schema: SceneCollection
example: |
{
"lastScene": "off",
"sceneValues": ["off","Reading","TVWatching"],
"rt": ["oic.wk.scenecollection"],
"n": "My Scenes for my living room",
"id": "0685B960-736F-46F7-BEC0-9E6CBD671ADC1",
"rts": ["oic.wk.scenemember"],
"links": [
]
}
post:
is: [ interface-update ]
description: |
Provides the action to change the last set scene selection.
Calling this method shall update all scene members to the prescribed membervalue.
When this method is called with the same value as the current lastScene value
then all scene members shall be updated.
body:
application/json:
schema: SceneCollectionUpdate
example: |
{
"lastScene": "Reading"
}
responses:
200:
description: |
Indicates that the value is changed.
The changed properties are provided in the response.
body:
application/json:
schema: SceneCollectionUpdate
example: |
{
"lastScene": "Reading"
}
/SceneMemberResURI:
description: |
Collection that models a scene member.
displayName: Scene Member
is: [ interface-baseline ]
get:
description: |
Provides the scene member
responses:
200:
body:
application/json:
schema: SceneMember
example: |
{
"rt": ["oic.wk.scenemember"],
"id": "0685B960-FFFF-46F7-BEC0-9E6234671ADC1",
"n": "my binary switch (for light bulb) mappings",
"link": {
"href": "binarySwitch",
"rt": ["oic.r.switch.binary"],
"if": ["oic.if.a", "oic.if.baseline"],
"eps": [
{"ep": "coap://[fe80::b1d6]:1111", "pri": 2},
{"ep": "coaps://[fe80::b1d6]:1122"},
{"ep": "coap+tcp://[2001:db8:a::123]:2222", "pri": 3}
]
},
"SceneMappings": [
{
"scene": "off",
"memberProperty": "value",
"memberValue": "true"
},
{
"scene": "Reading",
"memberProperty": "value",
"memberValue": "false"
},
{
"scene": "TVWatching",
"memberProperty": "value",
"memberValue": "true"
}
]
}