-
Notifications
You must be signed in to change notification settings - Fork 5
/
ruleset-checking-tool-api.yaml
307 lines (305 loc) · 8.73 KB
/
ruleset-checking-tool-api.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
openapi: 3.0.3
info:
title: Ruleset Checking Tool Web Service API
description: |-
termsOfService: NA
contact:
email: [email protected]
license:
name: MIT
url: https://github.com/pnnl/ruleset-checking-tool/blob/master/LICENSE
version: 1.0.11
externalDocs:
description: Find out more about Ruleset Checking Tool
url: http://github.com/pnnl/ruleset-checking-tool
servers:
- url: https://qe5fccavsl.execute-api.us-west-2.amazonaws.com/prod
tags:
- name: project evaluation
description: project evaluation workflow
externalDocs:
description: Find out more
url: https://github.com/pnnl/ruleset-checking-tool/wiki/Standard229#project-testing-workflow
- name: misc
description: Miscellaneous API calls
paths:
/evaluate:
post:
tags:
- project evaluation
summary: Run project evaluation on a set of RPDs
description: This function runs the ruleset evaluation. Parameters required include a string for ruleset, a string for desired reports written in a comma separate format and a zip file that contains all the required RPDs for evaluation.
parameters:
- name: ruleset
in: query
description: ruleset tag, for example ashrae9012019.
required: true
schema:
type: string
- name: reports
in: query
description: list of reports string in a command separated format, for example ASHRAE9012019DetailReport,RawSummary.
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Evaluation'
'400':
description: Invalid request, missing data.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'500':
description: Internal Error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
/evaluate/{id}:
get:
tags:
- project evaluation
summary: Get project evaluation status message
description: Returns summary of a project evaluation run based on the session ID
parameters:
- name: id
in: path
description: project evaluation session id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessMessage'
'400':
description: Invalid request, missing data.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'404':
description: Failed to find the data.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'500':
description: Internal Error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
post:
tags:
- project evaluation
summary: Get project evaluation report
description: API function to retrieve reports of an evaluation. Must be used when evaluation is completed successfully.
parameters:
- name: id
in: path
description: project evalution session id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/FileDownloadURL'
'400':
description: Invalid request, missing data.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'404':
description: Failed to find the data.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'500':
description: Internal Error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
/rulesets:
get:
tags:
- misc
summary: Get a list of available ruleset tags
description: Get a list of available ruleset tags
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RuleSetsCount'
'500':
description: Internal error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
/rules:
get:
tags:
- misc
summary: Get number of rules implemented for a ruleset.
description: Get the number of rules for a specified ruleset.
parameters:
- name: ruleset
in: query
description: ruleset tag, for example ashrae9012019.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RulesCount'
'400':
description: Invalid request, missing ruleset.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'500':
description: Internal error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
/reports:
get:
tags:
- misc
summary: Get a list of available reports for a specified ruleset.
description: Get a list of available reports for a specified ruleset.
parameters:
- name: ruleset
in: query
description: ruleset tag, for example ashrae9012019.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RuleSetReports'
'400':
description: Invalid request, missing ruleset.
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralDataError'
'500':
description: Internal error.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
components:
schemas:
Evaluation:
type: object
properties:
sessionId:
type: string
example: "abc-def-efg"
EvaluationStatus:
type: object
properties:
status:
type: string
description: evalution status
example: SUCCESS
enum:
- EVALUATING
- SUCCESS
- FAILURE
message:
type: string
description: status message
example: "Evaluation completed."
RuleSetsCount:
type: object
properties:
num_rulesets:
type: integer
format: int64
example: 10
rulesets:
type: array
items:
type: string
example: ["ashrae9012019"]
RulesCount:
type: object
properties:
num_rules:
type: integer
format: int64
example: 10
RuleSetReports:
type: object
properties:
num_reports:
type: integer
format: int64
example: 10
reports:
type: array
items:
type: string
example: ["ASHRAE9012019DetailReport"]
SuccessMessage:
type: object
properties:
message:
type: string
example: "Success"
GeneralDataError:
type: object
properties:
message:
type: string
example: "Invalid request, missing rulesets."
InternalError:
type: object
properties:
message:
type: string
example: "Internal Error."
FileDownloadURL:
type: object
properties:
url:
type: string
example: "https://rct-web/download/01"