-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbsh_openapi.yaml
511 lines (511 loc) · 18 KB
/
bsh_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
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
swagger: '2.0'
info:
description: This is the document for BuildSimHub cloud API.
version: 1.0.0
title: BuildSimHub Cloud API
termsOfService: >-
https://app.termly.io/document/terms-of-use-for-saas/5d663de5-6319-4b6e-970d-dda4de792ea5
contact:
email: [email protected]
license:
name: MIT
url: 'https://github.com/weilix88/buildsimhub_python_api/blob/master/LICENSE.txt'
host: my.buildsim.io
schemes:
- https
paths:
/CreateModel_API:
post:
summary: Simulate an energy model (IDF format) on cloud
description: >-
This API allows user to upload an EnergyPlus model and a weather file and run the model or not.
consumes:
- multipart/form-data
parameters:
- name: project_api_key
in: query
required: true
description: The project api key which can be found under the project info tab
type: string
- name: unit
in: query
required: false
description: 'unit system, can be either "ip" or "si", "ip" is defaut'
type: string
enum: ['ip', 'si']
- name: agents
in: query
required: false
description: 'simulation agents, 1,2 or 4, if set to 0 or empty string, then there will be no simulation performed'
type: integer
enum: [1,2,4]
- in: formData
name: model
type: file
required: true
description: Energy model (.idf, gbxml, .osm)
- in: formData
name: weather_file
type: file
required: true
description: Weather file (.epw)
responses:
'200':
description: Message describing simulation
schema:
type: object
properties:
status:
type: string
example: success
tracking:
type: string
description: the simulaton job key to access simulation status and results
example: 12-101-250
'460':
description: Invalid user api key
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Given user API key doesn't match any account
'461':
description: Invalid API request parameter
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Currently we only support IDF model
'464':
description: Simulation request failed
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Requested agents number is more than total agents number
'466':
description: Parse uploaded model or weather file failed
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Cannot read uploaded model file or weather file
/TrackSimulation_API:
get:
summary: Get a simulation status
description: This API request allows user to receive the simulation status of a specific model
parameters:
- name: project_api_key
in: query
required: true
description: The project api key which can be found under the project info tab
type: string
- name: track_token
in: query
required: true
type: string
description: The tracking token to access a model, returend by other API request
responses:
'200':
description: successfully received the request response
schema:
type: object
properties:
status:
type: string
example: success
has_more:
type: boolean
description: indicate whether the simulation is completed or not
doing:
type: string
description: indicates the simulation progress
example: Connecting to simulation engine
percent:
type: integer
description: the percentage of the simulation that is completed
is_queued:
type: boolean
description: indicate whether this simulation is queued, optional
example: true
queue_position:
type: integer
description: indicates the position of this simulation in the queue, optional
example: 3
'460':
description: Invalid user api key
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Given user API key doesn't match any account
'461':
description: Invalid API request parameter
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Tracking token is not valid
'462':
description: Resource access denied
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: You don't have access to this model
'465':
description: Abnormal simulation result or status
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Simulation terminated with error
/GetBuildingBasicInfo_API:
get:
summary: Get a model basic information
description: API request to retrieve model information
parameters:
- name: project_api_key
in: query
required: true
description: The project api key which can be found under the project info tab
type: string
- name: folder_api_key
in: query
required: false
description: The folder where the model located (either this or the track_token has to be filled), can be found in folder information side bar
type: string
- name: track_token
in: query
required: false
description: The tracking token to access a model (either this or the folder_api_key has to be filled), returned by other API request
type: string
- name: request_data
in: query
required: true
description: required data information
type: string
enum: ['BuildingStories','ConditionedZoneNumber','ZoneFloorArea','ConditionedZoneFloorArea','TotalWindowToWallRatio','TotalZoneNumber','Orientation']
responses:
'200':
description: Successfully received the request
schema:
type: object
properties:
status:
type: string
example: success
data:
type: object
description: data contains in either string or object format
properties:
value:
description: basic information value, string, numeric or array
example: 0.5
type:
type: string
description: value's type if value is a single value, or element\'s type if value is an array, either string or numeric
example: Numeric
enum: ['String', 'Numeric']
collection:
type: boolean
description: indicate whether value is an array
example: false
unit:
type: string
description: indicate the unit
example: kWh
'460':
description: Invalid user api key
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Given user API key doesn't match any account
'461':
description: Invalid API request parameter
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Tracking token is not valid
'462':
description: Resource access denied
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: You don't have access to this model
'467':
description: Access model failed
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Convert OSM to IDF is still in process...
/GetBuildingSimulationResults_API:
get:
summary: Get simulation results
description: API request to retrieve model simulation results
parameters:
- name: project_api_key
in: query
required: true
description: The project api key which can be found under the project info tab
type: string
- name: folder_api_key
in: query
required: false
description: The folder where the model located (either this or the track_token has to be filled), can be found in folder information side bar
type: string
- name: track_token
in: query
required: false
description: The tracking token to access a model (either this or the folder_api_key has to be filled), returned by other API request
type: string
- name: request_data
in: query
required: true
description: required data information
type: string
enum: ['CoolingElectricity','CoolingNaturalGas','DomesticHotWaterElectricity','DomesticHotWaterNaturalGas','ExteriorEquipmentElectricity','ExteriorEquipmentNaturalGas','ExteriorLightingElectricity','ExteriorLightingNaturalGas'
,'FansElectricity', 'FansNaturalGas','HeatingElectricity'
,'HeatingNaturalGas','HeatRejectionElectricity','HeatRejectionNaturalGas', 'InteriorEquipmentElectricity'
,'InteriorEquipmentNaturalGas','InteriorLightingElectricity'
,'InteriorLightingNaturalGas','PumpsElectricity','PumpsNaturalGas'
,'NetSiteEUI','NotMetHoursCooling','NotMetHoursHeating'
,'TotalEndUseElectricity','TotalEndUseNaturalGas','TotalSiteEUI','BuildingLPD','BuildingEPD','BuildingPPL'
,'WallRValue','RoofRValue','WindowUValue','WindowSHGC','RoofAbsorption','Infiltration','WaterHeaterEfficiency'
,'DXCoolingCoilEfficiency','ChillerEfficiency','ElectricBoilerEfficiency','FuelBoilerEfficiency','ElectricHeatingDXCoils']
responses:
'200':
description: successfully received the request
schema:
type: object
properties:
status:
type: string
example: success
data:
type: object
description: data contains in either string or object format
properties:
value:
description: basic information value, string, numeric or array
example: 0.5
type:
type: string
description: value's type if value is a single value, or element\'s type if value is an array, either string or numeric
example: Numeric
enum: ['String', 'Numeric']
collection:
type: boolean
description: indicate whether value is an array
example: false
unit:
type: string
description: indicate the unit
example: kWh
'460':
description: Invalid user api key
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Given user API key doesn't match any account
'461':
description: Invalid API request parameter
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Tracking token is not valid
'462':
description: Resource access denied
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: You don't have access to this model
'465':
description: Abnormal simulation result or status
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: No HTML is produced for this simulation job
'467':
description: Access model failed
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Unrecogonized model, please contact the BuildSimHub team at [email protected] for more info
/GetZoneLoadInfo_API:
get:
summary: retrieve a model's zone load information
description: This API retrieves a list of zone load information including zone peak cooling and heating loads, time of the peak and load densities, if a zone name is given, then this API will retrieve the detail load component inside this zone
parameters:
- name: project_api_key
in: query
required: true
description: The project api key which can be found under the project info tab
type: string
- name: folder_api_key
in: query
required: false
description: The folder where the model located (either this or the track_token has to be filled), can be found in folder information side bar
type: string
- name: track_token
in: query
required: false
description: The tracking token to access a model (either this or the folder_api_key has to be filled), returned by other API request
type: string
- name: zone_name
in: query
required: false
description: If this parameter is given, then the API will try to retrieve the detail load component of a zone from the simulation results
type: string
responses:
'200':
description: successfully received the request
schema:
type: object
properties:
status:
type: string
example: success
data:
type: object
description: data contains in either string or object format
properties:
zone_name:
type: string
example: 'zone-1'
floor_area:
type: number
example: 400
floor_area_unit:
type: string
example: 'ft2'
cooling_peak_load_time:
type: string
heating_peak_load_time:
type: string
data:
type: object
description: zone load
properties:
cooling_unit:
type: string
cooling:
type: array
items:
type: object
heating_unit:
type: string
heating:
type: array
items:
type: object
'460':
description: Invalid user api key
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Given user API key doesn't match any account
'461':
description: Invalid API request parameter
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: Tracking token is not valid
'462':
description: Resource access denied
schema:
type: object
properties:
status:
type: string
example: error
error_msg:
type: string
example: You don't have access to this model