info: title: CERC API Swagger - OpenAPI 3.0 description: NextGen Cities Institute API termsOfService: http://swagger.io/terms/ contact: email: peteryefi@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 sucessful 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 required: true description: the password for the user accessing this API - in: header name: application_id schema: type: string required: true description: the Id of the application accessing this API tags: - Session start summary: Starts an user session operationId: session_start description: Authentication and initialisation of a user session in the Api 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/keep_alive: put: security: - session_id: [] - token: [] - application_id: [] parameters: - in: header name: session_id schema: type: string required: true description: the Id of the current session - in: header name: token schema: type: string required: true description: the last token received from the API - in: header name: application_id schema: type: string required: true description: the Id of the application accessing this API 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_id: [] parameters: - in: header name: session_id schema: type: string required: true description: the Id of the current session - in: header name: token schema: type: string required: true description: the last token received from the API - in: header name: application_id schema: type: string required: true description: the Id of the application accessing this API 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' components: securitySchemes: session_id: type: apiKey in: header name: session_id application_id: type: apiKey in: header name: application_id 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: succeed: type: string example: 'OK'