api_v1.4/hub_api/docs/openapi-specs.yml
Guille 3d3a20f560 - Remove useless prints
- Enable security
- Update apidocs
2023-11-28 07:49:59 +01:00

322 lines
22 KiB
YAML

info:
title: CERC API Swagger - OpenAPI 3.0
description: NextGen Cities Institute API
termsOfService: http://swagger.io/terms/
contact:
email: nextgen-cities@gmail.com
version: 1.4
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
paths:
/api/v1.4/uptime:
get:
parameters:
[]
tags:
- Uptime
summary: API uptime
operationId: uptime
description: Retrieve current API uptime
responses:
'200':
description: Request successful
content:
application/json:
schema:
$ref: '#/components/schemas/uptime'
/api/v1.4/session/start:
put:
parameters:
- in: header
name: username
schema:
type: string
required: true
description: the application username accessing this API
- in: header
name: password
schema:
type: string
format: password
required: true
description: the password for the user accessing this API
- in: header
name: application-uuid
schema:
type: string
required: true
description: the uuid of the application accessing this API
tags:
- Session start
summary: Starts an user session
operationId: session_start
description: Authentication and initialization of a user session in the Api
responses:
'200':
description: Login succeed
content:
application/json:
schema:
$ref: '#/components/schemas/login-succeed'
headers:
session-id:
type: string
format: uuid
description: Session id
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
token:
type: string
format: uuid
description: Token expected in next operation header
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
/api/v1.4/session/keep-alive:
put:
security:
- session-id: []
- token: []
- application-uuid: []
parameters:
[]
tags:
- Keep alive
summary: Keep the current user session alive
operationId: keep_alive
description: Refresh and keep the current session alive and renew the token
responses:
'200':
description: Succeed
content:
application/json:
schema:
$ref: '#/components/schemas/succeed'
headers:
token:
type: string
format: uuid
description: Token expected in next operation header
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
/api/v1.4/session/end:
put:
security:
- session-id: []
- token: []
- application-uuid: []
parameters:
[]
tags:
- End session
summary: Ends the current user session
operationId: session_end
description: End the current user session and free the alocated resources
responses:
'200':
description: Succeed
content:
application/json:
schema:
$ref: '#/components/schemas/succeed'
headers:
token:
type: string
format: uuid
description: Token expected in next operation header
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
/api/v1.4/persistence/retrofit-results:
post:
security:
- session-id: [ ]
- token: [ ]
- application-uuid: [ ]
requestBody:
content:
application/json:
schema:
required:
- cities
properties:
scenarios:
type: object
description: List of scenarios and buildings
example: { "scenarios": [{ "current status": ["01002777"]}]}
tags:
- Persistence retrofit results
summary: Retrieve the monthly energy balance results for the given persistence in the given cities
operationId: retrofit_results
description: Retrieve the monthly energy balance results for the given persistence in the given cities
responses:
'200':
description: Succeed
content:
application/json:
schema:
$ref: '#/components/schemas/retrofit-results'
headers:
token:
type: string
format: uuid
description: Token expected in next operation header
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/bad-request'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
/api/v1.4/workflow/costs:
post:
security:
- session-id: [ ]
- token: [ ]
- application-uuid: [ ]
parameters:
[ ]
tags:
- Costs workflow
summary: Perform the costs workflow for the given parameters
operationId: costs_workflow
description: Perform the costs workflow for the given parameters
responses:
'500':
description: 'Error: INTERNAL SERVER ERROR'
content:
application/json:
schema:
$ref: '#/components/schemas/not-implemented-error'
/api/v1.4/workflow/energy-plus:
post:
security:
- session-id: [ ]
- token: [ ]
- application-uuid: [ ]
parameters:
[ ]
tags:
- Energy+ workflow
summary: Perform the Energy+ workflow for the given parameters
operationId: energy_plus_workflow
description: Perform the Energy+ workflow for the given parameters
responses:
'500':
description: 'Error: INTERNAL SERVER ERROR'
content:
application/json:
schema:
$ref: '#/components/schemas/not-implemented-error'
/api/v1.4/workflow/insel-monthly-energy-balance:
post:
security:
- session-id: [ ]
- token: [ ]
- application-uuid: [ ]
parameters:
[ ]
tags:
- INSEL monthly energy balance workflow
summary: Perform the INSEL monthly energy balance for the given parameters
operationId: insel_monthly_energy_balance_workflow
description: Perform the INSEL monthly energy balance for the given parameters
responses:
'500':
description: 'Error: INTERNAL SERVER ERROR'
content:
application/json:
schema:
$ref: '#/components/schemas/not-implemented-error'
components:
securitySchemes:
session-id:
type: apiKey
in: header
name: session-id
application-uuid:
type: apiKey
in: header
name: application-uuid
token:
type: apiKey
in: header
name: token
schemas:
uptime:
type: object
properties:
uptime:
type: string
format: hh:mm:ss.ms
example: '00:09:53.600281'
unauthorized:
type: object
properties:
error:
type: string
example: 'unauthorized'
bad-request:
type: object
properties:
error:
type: string
example: 'Bad request'
succeed:
type: object
properties:
result:
type: string
example: 'succeed'
login-succeed:
type: object
properties:
result:
type: string
example: 'succeed'
scenarios:
type: array
example: ["current status", "skin retrofit", "system retrofit and pv", "skin and system retrofit with pv" ]
retrofit-results:
type: object
properties:
result:
type: string
example: 'succeed'
results:
type: object
example: {"current status": [{"insel meb": {"yearly_cooling_demand": [139915565985.6], "yearly_heating_demand": [946037903311.7999], "monthly_cooling_demand": [1062027575.9999999, 1455667272, 2913820091.9999995, 5126171040, 12268559196, 26438384196, 37175203080, 33278811336, 12533019444, 4559094576, 2028131982, 1076676195.6], "monthly_heating_demand": [193527084239.99997, 167325342120, 133621776720, 67603872600.00001, 26189405856, 2729673633.6, 80411572.44, 339722753.76, 18183246696, 61765129800.00001, 101265975000, 173406262320], "yearly_cooling_peak_load": [70751.92355168048], "yearly_heating_peak_load": [265821.71590706997], "monthly_cooling_peak_load": [0, 0, 0, 23704049.209544852, 226527736.6216001, 208393704.42387304, 254706924.78604972, 226742765.1728123, 173702140.227622, 0, 0, 0], "monthly_heating_peak_load": [943555151.3984092, 956958177.2654519, 784598411.7075529, 558909088.0939025, 394141534.1303427, 304672504.7454845, 257866970.2761509, 279458101.0136905, 405030421.97738874, 516114196.8363748, 641862039.2524605, 814960144.1514305], "yearly_lighting_peak_load": [15366.176534280014], "monthly_lighting_peak_load": [15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014, 15366.176534280014], "yearly_cooling_consumption": [43317512689.04025], "yearly_heating_consumption": [1112985768602.1177], "monthly_cooling_consumption": [328801107.120743, 450670982.04334366, 902111483.5913311, 1587049857.5851393, 3798315540.557276, 8185258265.01548, 11509350798.76161, 10303037565.325077, 3880191778.328173, 1411484388.854489, 627904638.3900928, 333336283.4674922], "monthly_heating_consumption": [227678922635.2941, 196853343670.58823, 157202090258.82355, 79533967764.70589, 30811065712.941177, 3211380745.4117646, 94601849.92941177, 399673827.9529412, 21392054936.47059, 72664858588.2353, 119136441176.4706, 204007367435.29413], "yearly_appliances_peak_load": [2845.5882470888914], "monthly_appliances_peak_load": [2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914, 2845.5882470888914], "yearly_lighting_electrical_demand": [19054.770299568994], "monthly_lighting_electrical_demand": [1620.3253743632, 1461.6838295879943, 1620.3253743632001, 1562.70221235965, 1620.3253743632, 1567.4448594381315, 1615.5827272847184, 1620.3253743632001, 1562.70221235965, 1620.3253743632, 1567.4448594381315, 1615.5827272847189], "yearly_appliances_electrical_demand": [3528.661166586851], "monthly_appliances_electrical_demand": [300.0602545117037, 270.68219066444345, 300.0602545117037, 289.3892985851204, 300.0602545117037, 290.26756656261693, 299.18198653420717, 300.0602545117037, 289.3892985851204, 300.0602545117037, 290.267566562617, 299.1819865342071], "yearly_on_site_electrical_production": [31190525.408593904], "monthly_on_site_electrical_production": [1877874.359362581, 2407631.1359440456, 3166399.1449812627, 2775630.6676034825, 3179903.6853486714, 3230311.112227896, 3324165.5620982097, 3331899.9252680293, 3009420.8286597426, 2134013.7994201323, 1511733.2654212296, 1440028.4286681276], "yearly_domestic_hot_water_consumption": [1807.5205992667795], "yearly_domestic_hot_water_heat_demand": [1536.3925093767625], "monthly_domestic_hot_water_consumption": [149.28924325999526, 135.34031388082454, 153.09943206896986, 150.262068254786, 154.82504387257245, 149.77644912617848, 154.1220321804347, 153.7793440117826, 150.86557744567534, 154.9706918263543, 149.319112034428, 151.87129130477788], "monthly_domestic_hot_water_heat_demand": [126.89585677099596, 115.03926679870087, 130.13451725862438, 127.72275801656808, 131.6012872916866, 127.3099817572517, 131.0037273533695, 130.7124424100152, 128.23574082882405, 131.72508805240116, 126.9212452292638, 129.0905976090612], "yearly_distribution_systems_electrical_consumption": [0], "monthly_distribution_systems_electrical_consumption": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "building": "01002777", "costs": {"total_capital_costs_skin": 0.0, "total_capital_costs_systems": 478990.02792628907, "end_of_life_costs": 7558.875546789136, "total_operational_costs": 1100979.5861165554, "total_maintenance_costs": 492982.1855809587, "operational_incomes": 66741122.5009465, "capital_incomes": 0.0, "global_capital_costs": {"B2010_opaque_walls": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "B2020_transparent": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "B3010_opaque_roof": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "B10_superstructure": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "D3020_heat_generating_systems": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 441381.7588948803, 0.0, 0.0, 0.0, 0.0, 0.0], "D3030_cooling_generation_systems": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 79364.9564992193, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 142931.80297210798], "D3080_other_hvac_ahu": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6067.7507441364405, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10927.676295687283], "D5020_lighting_and_branch_wiring": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 270843.66336580116, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "D301010_photovoltaic_system": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}, "global_end_of_life_costs": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 18897.796187287942], "global_operational_costs": {"fixed_costs_electricity_peak": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "fixed_costs_electricity_monthly": [0.0, 1718.5501654125007, 1804.4776736831257, 1894.7015573672822, 1989.4366352356465, 2088.908466997429, 2193.3538903473004, 2303.0215848646653, 2418.172664107899, 2539.081297313294, 2666.0353621789586, 2799.337130287907, 2939.303986802302, 3086.2691861424173, 3240.5826454495386, 3402.6117777220156, 3572.7423666081163, 3751.379484938522, 3938.9484591854484, 4135.895882144721, 4342.6906762519575, 4559.825210064556, 4787.816470567784, 5027.207294096173, 5278.567658800982, 5542.496041741031, 5819.620843828083, 6110.601886019487, 6416.131980320462, 6736.938579336486, 7073.785508303311, 7427.474783718476], "variable_costs_electricity": [0.0, 25294.134811796157, 26558.841552385966, 27886.783630005266, 29281.12281150553, 30745.178952080812, 32282.437899684854, 33896.5597946691, 35591.38778440255, 37370.95717362268, 39239.505032303816, 41201.48028391901, 43261.55429811496, 45424.63201302071, 47695.86361367175, 50080.65679435534, 52584.689634073104, 55213.92411577676, 57974.6203215656, 60873.35133764389, 63917.01890452608, 67112.86984975239, 70468.51334224001, 73991.93900935202, 77691.53595981962, 81576.11275781061, 85654.91839570114, 89937.6643154862, 94434.54753126051, 99156.27490782355, 104114.08865321474, 109319.79308587547], "fixed_costs_gas": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "variable_costs_gas": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}, "global_maintenance_costs": {"heating_maintenance": [0.0, 11058.183381734112, 11500.510717003477, 11960.531145683615, 12438.952391510962, 12936.5104871714, 13453.970906658258, 13992.129742924586, 14551.81493264157, 15133.887529947235, 15739.243031145124, 16368.81275239093, 17023.56526248657, 17704.507872986032, 18412.688187905474, 19149.19571542169, 19915.16354403856, 20711.770085800104, 21540.24088923211, 22401.850524801393, 23297.92454579345, 24229.84152762519, 25199.035188730195, 26206.99659627941, 27255.276460130586, 28345.487518535807, 29479.30701927724, 30658.47930004833, 31884.818472050265, 33160.21121093228, 34486.61965936957, 35866.08444574435], "cooling_maintenance": [0.0, 2943.2800197499078, 3061.0112205399046, 3183.4516693615005, 3310.789736135961, 3443.221325581399, 3580.950178604656, 3724.1881857488415, 3873.1557131787954, 4028.0819417059474, 4189.205219374186, 4356.773428149153, 4531.04436527512, 4712.286139886124, 4900.777585481569, 5096.808688900832, 5300.6810364568655, 5512.708277915141, 5733.216609031747, 5962.545273393017, 6201.047084328738, 6449.088967701888, 6707.052526409962, 6975.334627466362, 7254.348012565017, 7544.521933067616, 7846.302810390322, 8160.154922805935, 8486.561119718173, 8826.0235645069, 9179.064507087176, 9546.227087370664], "pv_maintenance": [0.0, 115.60601881146431, 120.2302595639229, 125.03946994647981, 130.041048744339, 135.24269069411255, 140.6523983218771, 146.27849425475216, 152.12963402494225, 158.21481938593996, 164.54341216137755, 171.12514864783267, 177.970154593746, 185.08896077749583, 192.49251920859567, 200.1922199769395, 208.19990877601708, 216.52790512705778, 225.1890213321401, 234.1965821854257, 243.56444547284275, 253.30702329175648, 263.4393042234267, 273.9768763923638, 284.9359514480584, 296.3333895059807, 308.18672508621995, 320.51419408966876, 333.33476185325554, 346.66815232738577, 360.5348784204812, 374.95627355730045]}, "global_operational_incomes": [0.0, 1637502.58395118, 1719377.7131487392, 1805346.598806176, 1895613.9287464852, 1990394.6251838095, 2089914.356443, 2194410.0742651504, 2304130.5779784075, 2419337.1068773284, 2540303.9622211945, 2667319.1603322546, 2800685.1183488676, 2940719.374266311, 3087755.3429796267, 3242143.110128608, 3404250.2656350383, 3574462.7789167906, 3753185.91786263, 3940845.213755762, 4137887.47444355, 4344781.848165728, 4562020.940574015, 4790121.987602715, 5029628.086982851, 5281109.4913319945, 5545164.965898594, 5822423.214193524, 6113544.3749032, 6419221.593648362, 6740182.67333078, 7077191.806997319], "global_capital_incomes": {"subsidies_construction": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "subsidies_hvac": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "subsidies_pv": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}}, "operational_co2": {"Heating": {"year": [349.30046532215226], "month": [71.45496004000138, 61.78063231726681, 49.33644690352923, 24.961012739651995, 9.669772870608192, 1.0078626522851257, 0.029689930574928174, 0.12543399746826067, 6.713701966639867, 22.805205271688227, 37.38988899384856, 64.02585763858971]}, "Domestic Hot Water": {"year": [5.672739079101108e-07], "month": [4.685307180863904e-08, 4.247532713270329e-08, 4.804886492790925e-08, 4.7158384089302076e-08, 4.8590432504933015e-08, 4.700597694055211e-08, 4.836979867643488e-08, 4.8262249110081556e-08, 4.734778996236065e-08, 4.863614279114191e-08, 4.686244585195772e-08, 4.766342411409529e-08]}, "Cooling": {"year": [13.594807557947428], "month": [0.10319123833898035, 0.14143899066440566, 0.28311948802964193, 0.49808116993284063, 1.1920668019173217, 2.5688688942922213, 3.6121051166832197, 3.2335146749627692, 1.2177629148048403, 0.44298154363740233, 0.19706216247766303, 0.10461456220611944]}, "Lights": {"year": [5.980166431602936e-06], "month": [5.085243883659119e-07, 4.5873618174849724e-07, 5.08524388365912e-07, 4.904398828232637e-07, 5.085243883659119e-07, 4.919283194934404e-07, 5.070359516957351e-07, 5.08524388365912e-07, 4.904398828232637e-07, 5.085243883659119e-07, 4.919283194934404e-07, 5.070359516957352e-07]}, "Appliances": {"year": [1.1074382280746176e-06], "month": [9.417118303072444e-08, 8.495114476824025e-08, 9.417118303072444e-08, 9.08222005228266e-08, 9.417118303072444e-08, 9.10978369432297e-08, 9.389554661032133e-08, 9.417118303072444e-08, 9.08222005228266e-08, 9.417118303072444e-08, 9.109783694322972e-08, 9.389554661032132e-08]}, "Electricity": {"year": [0], "month": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}]}
not-implemented-error:
type: object
properties:
error:
type: string
example: 'NotImplementedError'