-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
181 lines (179 loc) · 4.8 KB
/
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
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
171
172
173
174
175
176
177
178
179
180
181
openapi: 3.0.3
info:
title: Relynk Query API
description: >-
Relynk empowers PropTech companies by providing seamless access to a
commercial building's real-time data. Our easy-to-use API platform connects
you to an extensive range of real-time information, including occupancy
levels, energy usage, ambient conditions, and more, supercharging your
data-driven solutions and giving you the edge you need to succeed.
With Relynk, tapping into the expansive network of sensors and IoT devices
within any commercial building has never been simpler.
version: 2.0.0
servers:
- url: https://api.relynk.io/v2.0.0
tags:
- name: Query
paths:
/query:
post:
tags:
- Query
summary: Query for point data
operationId: Query_pointDataFilters
security:
- api_key: []
- bearer: []
description: Query for point data with filters
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/QueryParameters'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/QueryPointDataFiltersResponse'
components:
schemas:
QueryFilter:
type: object
properties:
value:
oneOf:
- type: array
items:
type: string
- type: array
items:
type: number
items:
type: object
filter_on:
type: string
enum:
- point_id
- resource_type
- resource_id
- resource_external_reference
- point_subtype
required:
- value
- filter_on
QueryParameters:
type: object
properties:
filters:
example:
- filter_on: point_subtype
value:
- https://brickschema.org/schema/Brick#Air_Temperature_Sensor
type: array
items:
$ref: '#/components/schemas/QueryFilter'
group_on:
enum:
- https://w3id.org/rec#Desk
- https://w3id.org/rec#Room
- https://w3id.org/rec#Level
- https://w3id.org/rec#Zone
- https://w3id.org/rec#Building
- https://w3id.org/rec#Facade
- https://brickschema.org/schema/Brick#Point
- None
type: string
example: https://w3id.org/rec#Building
to:
format: date-time
type: string
example: '2020-01-01T00:00:00.000Z'
from:
format: date-time
type: string
example: '2020-01-02T00:00:00.000Z'
resolution:
type: string
enum:
- raw
- 30 minute
- 1 hour
- 1 day
- 1 week
- 1 month
- 1 year
is_timeseries:
type: boolean
only_latest_value:
type: boolean
limit:
type: number
offset:
type: number
required:
- filters
- resolution
- is_timeseries
- only_latest_value
QueryResponseDataPoint:
type: object
properties:
point_subtype:
type: string
example: https://brickschema.org/schema/Brick#Air_Temperature_Sensor
unit_type:
type: string
example: http://qudt.org/vocab/unit/DEG_C
group_resource_id:
type: string
group_resource_name:
type: string
group_resource_type:
enum:
- https://w3id.org/rec#Desk
- https://w3id.org/rec#Room
- https://w3id.org/rec#Level
- https://w3id.org/rec#Zone
- https://w3id.org/rec#Building
- https://w3id.org/rec#Facade
type: string
example: https://w3id.org/rec#Building
group_point_id:
type: string
group_point_name:
type: string
value:
type: number
example: 24.5
average_value:
type: number
example: 22.5
time_weighted_average_value:
type: number
example: 22.7
count_value:
type: number
example: null
sum_value:
type: number
example: null
min_value:
type: number
example: 18.5
max_value:
type: number
example: 24.7
date_time:
format: date-time
type: string
required:
- point_subtype
- unit_type
- date_timemeasurement_typea
QueryPointDataFiltersResponse:
type: array
items:
$ref: '#/components/schemas/QueryResponseDataPoint'