2023-01-16 15:31:02 -05:00
|
|
|
info:
|
2023-01-23 12:29:41 -05:00
|
|
|
title: CERC API Swagger - OpenAPI 3.0
|
|
|
|
description: NextGen Cities Institute API
|
2023-01-16 15:31:02 -05:00
|
|
|
termsOfService: http://swagger.io/terms/
|
|
|
|
contact:
|
2023-02-24 17:06:04 -05:00
|
|
|
email: nextgen-cities@gmail.com
|
2023-01-16 15:31:02 -05:00
|
|
|
version: 1.4
|
|
|
|
externalDocs:
|
|
|
|
description: Find out more about Swagger
|
|
|
|
url: http://swagger.io
|
|
|
|
paths:
|
2023-01-24 05:38:45 -05:00
|
|
|
/v1.4/uptime:
|
|
|
|
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':
|
2023-02-22 23:14:41 -05:00
|
|
|
description: Request successful
|
2023-01-24 05:38:45 -05:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-02-14 04:32:04 -05:00
|
|
|
$ref: '#/components/schemas/uptime'
|
2023-07-21 11:43:52 -04:00
|
|
|
|
2023-02-14 04:32:04 -05:00
|
|
|
/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
|
2023-04-12 15:26:56 -04:00
|
|
|
format: password
|
2023-02-14 04:32:04 -05:00
|
|
|
required: true
|
|
|
|
description: the password for the user accessing this API
|
|
|
|
- in: header
|
2023-02-21 10:47:17 -05:00
|
|
|
name: application_uuid
|
2023-02-14 04:32:04 -05:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
required: true
|
2023-02-21 10:47:17 -05:00
|
|
|
description: the uuid of the application accessing this API
|
2023-02-14 04:32:04 -05:00
|
|
|
tags:
|
|
|
|
- Session start
|
|
|
|
summary: Starts an user session
|
|
|
|
operationId: session_start
|
2023-02-21 10:47:17 -05:00
|
|
|
description: Authentication and initialization of a user session in the Api
|
2023-02-14 04:32:04 -05:00
|
|
|
responses:
|
|
|
|
'200':
|
2023-02-21 10:47:17 -05:00
|
|
|
description: Login succeed
|
2023-02-14 04:32:04 -05:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-07-20 20:15:24 -04:00
|
|
|
$ref: '#/components/schemas/login-succeed'
|
2023-02-14 05:37:59 -05:00
|
|
|
headers:
|
2023-02-14 05:54:51 -05:00
|
|
|
session_id:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
description: Session id
|
|
|
|
example: '77e1c83b-7bb0-437b-bc50-a7a58e5660ac'
|
2023-02-14 05:37:59 -05:00
|
|
|
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-07-21 11:43:52 -04:00
|
|
|
|
2023-07-20 20:15:24 -04:00
|
|
|
/v1.4/session/keep-alive:
|
2023-02-14 05:37:59 -05:00
|
|
|
put:
|
|
|
|
security:
|
|
|
|
- session_id: []
|
|
|
|
- token: []
|
2023-02-21 10:47:17 -05:00
|
|
|
- application_uuid: []
|
2023-02-14 05:37:59 -05:00
|
|
|
parameters:
|
2023-02-14 05:43:03 -05:00
|
|
|
[]
|
2023-02-14 05:37:59 -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-07-21 11:43:52 -04:00
|
|
|
|
2023-02-14 05:37:59 -05:00
|
|
|
/v1.4/session/end:
|
|
|
|
put:
|
|
|
|
security:
|
|
|
|
- session_id: []
|
|
|
|
- token: []
|
2023-02-21 10:47:17 -05:00
|
|
|
- application_uuid: []
|
2023-02-14 05:37:59 -05:00
|
|
|
parameters:
|
2023-02-14 05:43:03 -05:00
|
|
|
[]
|
2023-02-14 05:37:59 -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'
|
2023-02-14 04:32:04 -05:00
|
|
|
'403':
|
|
|
|
description: Unauthorized
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/unauthorized'
|
2023-07-21 11:43:52 -04:00
|
|
|
|
2023-07-21 11:48:00 -04:00
|
|
|
/v1.4/persistence/retrofit-results:
|
2023-03-13 11:56:05 -04:00
|
|
|
post:
|
2023-02-24 17:06:04 -05:00
|
|
|
security:
|
|
|
|
- session_id: [ ]
|
|
|
|
- token: [ ]
|
|
|
|
- application_uuid: [ ]
|
2023-03-13 11:56:05 -04:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
required:
|
|
|
|
- cities
|
|
|
|
properties:
|
|
|
|
cities:
|
|
|
|
type: object
|
|
|
|
description: Cities list
|
2023-03-13 15:01:46 -04:00
|
|
|
example: { "cities": [{ "Montreal current status": ["149_part_0_zone_0", "1_part_0_zone_0"]}]}
|
2023-02-24 17:06:04 -05:00
|
|
|
tags:
|
2023-07-21 11:48:00 -04:00
|
|
|
- Buildings monthly energy balance persistence
|
|
|
|
summary: Retrieve the monthly energy balance results for the given persistence in the given cities
|
2023-07-21 11:43:52 -04:00
|
|
|
operationId: retrofit_results
|
2023-07-21 11:48:00 -04:00
|
|
|
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'
|
2023-04-12 15:26:56 -04:00
|
|
|
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-07-21 11:43:52 -04:00
|
|
|
|
|
|
|
/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'
|
|
|
|
|
|
|
|
/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'
|
|
|
|
|
|
|
|
/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'
|
2023-01-16 15:31:02 -05:00
|
|
|
components:
|
2023-02-14 05:37:59 -05:00
|
|
|
securitySchemes:
|
|
|
|
session_id:
|
|
|
|
type: apiKey
|
|
|
|
in: header
|
|
|
|
name: session_id
|
2023-02-21 10:47:17 -05:00
|
|
|
application_uuid:
|
2023-02-14 05:37:59 -05:00
|
|
|
type: apiKey
|
|
|
|
in: header
|
2023-02-21 10:47:17 -05:00
|
|
|
name: application_uuid
|
2023-02-14 05:37:59 -05:00
|
|
|
token:
|
|
|
|
type: apiKey
|
|
|
|
in: header
|
|
|
|
name: token
|
2023-01-16 15:31:02 -05:00
|
|
|
schemas:
|
2023-02-14 04:32:04 -05:00
|
|
|
uptime:
|
2023-01-24 05:50:49 -05:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
uptime:
|
|
|
|
type: string
|
|
|
|
format: hh:mm:ss.ms
|
2023-02-14 05:37:59 -05:00
|
|
|
example: '00:09:53.600281'
|
|
|
|
unauthorized:
|
2023-02-14 04:32:04 -05:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-02-14 05:37:59 -05:00
|
|
|
error:
|
2023-02-14 04:32:04 -05:00
|
|
|
type: string
|
2023-02-14 05:37:59 -05:00
|
|
|
example: 'unauthorized'
|
|
|
|
succeed:
|
2023-02-14 04:32:04 -05:00
|
|
|
type: object
|
|
|
|
properties:
|
2023-02-21 10:47:17 -05:00
|
|
|
result:
|
|
|
|
type: string
|
2023-02-22 23:14:41 -05:00
|
|
|
example: 'succeed'
|
2023-07-20 20:15:24 -04:00
|
|
|
login-succeed:
|
2023-02-21 10:47:17 -05:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
result:
|
2023-02-14 04:32:04 -05:00
|
|
|
type: string
|
2023-02-22 23:14:41 -05:00
|
|
|
example: 'succeed'
|
2023-02-21 10:47:17 -05:00
|
|
|
cities:
|
|
|
|
type: array
|
2023-02-24 17:06:04 -05:00
|
|
|
example: [{'name': 'city 1', 'geometric_level_of_detail': '1'}, {'name': 'city 2', 'geometric_level_of_detail': '1'}]
|
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:
|
2023-03-13 11:56:05 -04:00
|
|
|
type: object
|
2023-07-20 20:15:24 -04:00
|
|
|
example: {
|
2023-03-13 15:01:46 -04:00
|
|
|
"result":"succeed",
|
|
|
|
"results":{
|
|
|
|
"Montreal current status":[
|
|
|
|
{
|
|
|
|
"insel meb":[
|
|
|
|
{
|
|
|
|
"monthly_cooling":{
|
|
|
|
"0":381853.821,
|
|
|
|
"1":484038.818,
|
|
|
|
"2":944923.8890000001,
|
|
|
|
"3":1465614.62,
|
|
|
|
"4":2816751.71,
|
|
|
|
"5":4673754.880000001,
|
|
|
|
"6":5804651.86,
|
|
|
|
"7":5113784.18,
|
|
|
|
"8":2464006.1,
|
|
|
|
"9":1113856.5699999998,
|
|
|
|
"10":588973.45,
|
|
|
|
"11":384227.386
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"yearly_cooling":{
|
|
|
|
"0":26236437.283999998
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"monthly_heating":{
|
|
|
|
"0":23752326.2,
|
|
|
|
"1":20536490.2,
|
|
|
|
"2":16533607.4,
|
|
|
|
"3":8818033.2,
|
|
|
|
"4":4036963.87,
|
|
|
|
"5":915646.973,
|
|
|
|
"6":247277.222,
|
|
|
|
"7":393324.463,
|
|
|
|
"8":3161278.32,
|
|
|
|
"9":8418375.98,
|
|
|
|
"10":13028175.8,
|
|
|
|
"11":21456785.2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"yearly_heating":{
|
|
|
|
"0":121298284.828
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"building":"149_part_0_zone_0"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"insel meb":[
|
|
|
|
{
|
|
|
|
"monthly_cooling":{
|
|
|
|
"0":783396.606,
|
|
|
|
"1":1044300.2899999999,
|
|
|
|
"2":1839283.69,
|
|
|
|
"3":2594479.49,
|
|
|
|
"4":4809622.07,
|
|
|
|
"5":7720497.56,
|
|
|
|
"6":9451286.13,
|
|
|
|
"7":8666059.57,
|
|
|
|
"8":4576645.510000001,
|
|
|
|
"9":2222742.19,
|
|
|
|
"10":1180251.0999999999,
|
|
|
|
"11":759023.5599999999
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"yearly_cooling":{
|
|
|
|
"0":45647587.766
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"monthly_heating":{
|
|
|
|
"0":33584593.800000004,
|
|
|
|
"1":28801277.3,
|
|
|
|
"2":23248582.0,
|
|
|
|
"3":12622207.0,
|
|
|
|
"4":5935129.39,
|
|
|
|
"5":1533334.23,
|
|
|
|
"6":541973.145,
|
|
|
|
"7":763742.676,
|
|
|
|
"8":4608120.61,
|
|
|
|
"9":11964252.9,
|
|
|
|
"10":18499837.9,
|
|
|
|
"11":30418062.5
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"yearly_heating":{
|
|
|
|
"0":172521113.451
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"building":"1_part_0_zone_0"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2023-07-21 11:43:52 -04:00
|
|
|
}
|
|
|
|
not-implemented-error:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
example: 'NotImplementedError'
|