api_v1.4/hub_api/docs/openapi-specs.yml

322 lines
22 KiB
YAML
Raw Permalink Normal View History

info:
2023-01-23 12:29:41 -05:00
title: CERC API Swagger - OpenAPI 3.0
description: NextGen Cities Institute API
termsOfService: http://swagger.io/terms/
contact:
2023-02-24 17:06:04 -05:00
email: nextgen-cities@gmail.com
version: 1.4
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
paths:
2023-08-03 09:53:26 -04:00
/api/v1.4/uptime:
2023-01-24 05:38:45 -05:00
get:
2023-02-13 08:09:48 -05:00
parameters:
[]
2023-01-24 05:38:45 -05:00
tags:
- Uptime
summary: API uptime
operationId: uptime
description: Retrieve current API uptime
responses:
'200':
description: Request successful
2023-01-24 05:38:45 -05:00
content:
application/json:
schema:
$ref: '#/components/schemas/uptime'
2023-08-03 09:53:26 -04:00
/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:
2023-07-20 20:15:24 -04:00
$ref: '#/components/schemas/login-succeed'
headers:
session-id:
2023-02-14 05:54:51 -05:00
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'
2023-08-03 09:53:26 -04:00
/api/v1.4/session/keep-alive:
put:
security:
- session-id: []
- token: []
- application-uuid: []
parameters:
2023-02-14 05:43:03 -05:00
[]
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'
2023-08-03 09:53:26 -04:00
/api/v1.4/session/end:
put:
security:
- session-id: []
- token: []
- application-uuid: []
parameters:
2023-02-14 05:43:03 -05:00
[]
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'
2023-08-03 09:53:26 -04:00
/api/v1.4/persistence/retrofit-results:
post:
2023-02-24 17:06:04 -05:00
security:
- session-id: [ ]
2023-02-24 17:06:04 -05:00
- 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"]}]}
2023-02-24 17:06:04 -05:00
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
2023-02-24 17:06:04 -05:00
responses:
'200':
description: Succeed
content:
application/json:
schema:
2023-07-20 20:15:24 -04:00
$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'
2023-08-03 09:53:26 -04:00
/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'
2023-08-03 09:53:26 -04:00
/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'
2023-08-03 09:53:26 -04:00
/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'
2023-07-20 20:15:24 -04:00
login-succeed:
type: object
properties:
result:
type: string
example: 'succeed'
2023-07-28 08:26:02 -04:00
scenarios:
type: array
2023-07-28 08:26:02 -04:00
example: ["current status", "skin retrofit", "system retrofit and pv", "skin and system retrofit with pv" ]
2023-07-20 20:15:24 -04:00
retrofit-results:
2023-02-24 17:06:04 -05:00
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], "mo
not-implemented-error:
type: object
properties:
error:
type: string
2023-08-03 09:53:26 -04:00
example: 'NotImplementedError'