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

583 lines
19 KiB
YAML
Raw 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
2023-07-20 20:15:24 -04:00
example: {
"current status":
[
{
"insel meb": [
2023-03-13 15:01:46 -04:00
{
"monthly_cooling_peak_load": [
0,
0,
0,
6584.458113320823,
62924.37128642762,
57887.14012015144,
70751.92355485224,
62984.101439783015,
48250.59450887724,
0,
0,
0
]
2023-03-13 15:01:46 -04:00
},
{
"yearly_cooling_peak_load": [
70751.92355485224
]
2023-03-13 15:01:46 -04:00
},
{
"monthly_heating_peak_load": [
262098.65318553636,
265821.7159266224,
217944.00326807727,
155252.5244818504,
109483.75948860023,
84631.2513243329,
71629.71397081681,
77627.25028728181,
112508.45055758546,
143365.05468737005,
178295.01091663004,
226377.81783654366
]
2023-03-13 15:01:46 -04:00
},
{
"yearly_heating_peak_load": [
265821.7159266224
]
},
{
"monthly_cooling_demand": [
295005.341,
404348.816,
809382.8119999999,
1423909.9100000001,
3407862.3,
7343880.86,
10326290.0,
9243987.3,
3481350.34,
1266403.6900000002,
563368.2250000001,
299075.714
]
},
{
"yearly_cooling_demand": [
38864865.308000006
]
},
{
"monthly_heating_demand": [
53757554.7,
46479308.599999994,
37117226.6,
18778937.5,
7274898.4399999995,
758257.8119999999,
22337.890600000002,
94370.8496,
5050939.94,
17157021.5,
28129459.0,
48168429.7
]
},
{
"yearly_heating_demand": [
262788742.53219998
]
},
{
"monthly_lighting_electrical_demand": [
5833171.347707521,
5262061.78651678,
5833171.347707521,
5625727.964494741,
5833171.347707521,
5642801.493977274,
5816097.818224987,
5833171.347707521,
5625727.964494741,
5833171.347707521,
5642801.493977274,
5816097.818224987
]
},
{
"yearly_lighting_electrical_demand": [
68597173.07844839
]
},
2023-03-13 15:01:46 -04:00
{
"monthly_appliances_electrical_demand": [
1080216.9162421336,
974455.8863919963,
1080216.9162421334,
1041801.4749064334,
1080216.9162421334,
1044963.239625421,
1077055.1515231456,
1080216.9162421334,
1041801.4749064333,
1080216.9162421336,
1044963.239625421,
1077055.1515231456
]
2023-03-13 15:01:46 -04:00
},
{
"yearly_appliances_electrical_demand": [
12703180.199712664
]
2023-03-13 15:01:46 -04:00
},
{
"monthly_domestic_hot_water_heat_demand": [
456825.0843755854,
414141.3604753232,
468484.2621310478,
459801.92885964504,
473764.6342500718,
458315.9343261062,
471613.41847213014,
470564.79267605464,
461648.6669837665,
474210.31698864425,
456916.48282534967,
464726.15139262035
]
2023-03-13 15:01:46 -04:00
},
{
"yearly_domestic_hot_water_heat_demand": [
5531013.0337563455
]
},
{
"monthly_heating_consumption": [
63244182.00000001,
54681539.529411756,
43667325.41176471,
22092867.647058826,
8558704.047058823,
892068.014117647,
26279.87129411765,
111024.52894117647,
5942282.282352942,
20184731.17647059,
33093481.17647059,
56668740.823529415
]
},
{
"yearly_heating_consumption": [
309163226.5084706
]
},
{
"monthly_cooling_consumption": [
91332.92291021673,
125185.3919504644,
250582.91393188853,
440838.98142414866,
1055065.7275541795,
2273647.3250773996,
3196993.808049536,
2861915.5727554183,
1077817.4427244582,
392075.4458204335,
174417.40712074307,
92593.10030959752
]
},
{
"yearly_cooling_consumption": [
12032466.039628485
]
},
{
"monthly_domestic_hot_water_consumption": [
537441.2757359828,
487225.1299709685,
551157.9554482915,
540943.4457172295,
557370.157941261,
539195.2168542426,
554839.3158495649,
553605.6384424173,
543116.0788044311,
557894.4905748756,
537548.8033239408,
546736.6486972005
]
},
{
"yearly_domestic_hot_water_consumption": [
6507074.157360407
]
},
{
"monthly_distribution_systems_electrical_consumption": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
]
},
{
"yearly_distribution_systems_electrical_consumption": [
0.0
]
},
{
"monthly_on_site_electrical_production": [
1877568.0052112115,
2407257.798870815,
3166036.3496084926,
2775127.9773544166,
3179310.676411243,
3229758.071462234,
3323472.052358032,
3331301.907608147,
3009020.446469887,
2133712.041565227,
1511572.9397916023,
1439817.2575820587
]
},
{
"yearly_on_site_electrical_production": [
31185356.31301905
]
2023-03-13 15:01:46 -04:00
}
],
"building": "01002777"
}
]
}
not-implemented-error:
type: object
properties:
error:
type: string
2023-08-03 09:53:26 -04:00
example: 'NotImplementedError'