forked from openconnectivityfoundation/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oic.wk.res.raml
executable file
·116 lines (105 loc) · 3.34 KB
/
oic.wk.res.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
#%RAML 0.8
title: Discoverable Resources
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:
- sbaseline: !include schemas/oic.wk.res-schema.json
- slinklist: !include schemas/oic.wk.res-schema-ll.json
traits:
- interface-all:
queryParameters:
if:
enum: ["oic.if.ll", "oic.if.baseline"]
- interface-baseline:
queryParameters:
if:
enum: ["oic.if.baseline"]
- interface-ll:
queryParameters:
if:
enum: ["oic.if.ll"]
/oic/res?if=oic.if.baseline:
displayName: Discoverable Resources Baseline Interface
is: [ interface-baseline ]
description: |
Baseline representation of /oic/res; list of discoverable resources
get:
description: |
Retrieve the discoverable resource set, baseline interface
responses:
200:
body:
application/json:
schema: sbaseline
example: |
[
{
"rt": ["oic.wk.res"],
"if": ["oic.if.baseline", "oic.if.ll" ],
"links":
[
{
"href": "/humidity",
"rt": ["oic.r.humidity"],
"if": ["oic.if.s"],
"p": {"bm": 3},
"eps": [
{"ep": "coaps://[fe80::b1d6]:1111", "pri": 2},
{"ep": "coaps://[fe80::b1d6]:1122"},
{"ep": "coap+tcp://[2001:db8:a::123]:2222", "pri": 3}
]
},
{
"href": "/temperature",
"rt": ["oic.r.temperature"],
"if": ["oic.if.s"],
"p": {"bm": 3},
"eps": [
{"ep": "coaps://[[2001:db8:a::123]:2222"}
]
}
]
}
]
/oic/res?if=oic.if.ll:
displayName: Discoverable Resources Link List interface
is: [ interface-ll]
description: |
Link list representation of /oic/res; list of discoverable resources
get:
description: |
Retrieve the discoverable resource set, link list interface
responses:
200:
body:
application/json:
schema: slinklist
example: |
[
{
"href": "/humidity",
"rt": ["oic.r.humidity"],
"if": ["oic.if.s"],
"p": {"bm": 3},
"eps": [
{"ep": "coaps://[fe80::b1d6]:1111", "pri": 2},
{"ep": "coaps://[fe80::b1d6]:1122"},
{"ep": "coaps+tcp://[2001:db8:a::123]:2222", "pri": 3}
]
},
{
"href": "/temperature",
"rt": ["oic.r.temperature"],
"if": ["oic.if.s"],
"p": {"bm": 3},
"eps": [
{"ep": "coaps://[[2001:db8:a::123]:2222"}
]
}
]