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: /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' /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' /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' /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' /v1.4/buildings/retrofit-results: post: security: - session_id: [ ] - token: [ ] - application_uuid: [ ] requestBody: content: application/json: schema: required: - cities properties: cities: type: object description: Cities list example: { "cities": [{ "Montreal current status": ["149_part_0_zone_0", "1_part_0_zone_0"]}]} tags: - Buildings monthly energy balance meb summary: Retrieve the monthly energy balance results for the given buildings in the given cities operationId: building_monthly_energy_balance description: Retrieve the monthly energy balance results for the given buildings 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' '403': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' 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' succeed: type: object properties: result: type: string example: 'succeed' login-succeed: type: object properties: result: type: string example: 'succeed' cities: type: array example: [{'name': 'city 1', 'geometric_level_of_detail': '1'}, {'name': 'city 2', 'geometric_level_of_detail': '1'}] retrofit-results: type: object properties: result: type: string example: 'succeed' results: type: object example: { "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" } ] } }