openapi: 3.2.0 info: description: REST API for the Clinical Knowledge Manager. version: 1.6.0 title: CKM REST Sessions API contact: name: CKM Support url: https://oceanehr.atlassian.net/servicedesk/customer/portal/15 email: ckm@oceaninformatics.com servers: - url: /ckm/rest/v1 tags: - name: Sessions description: Endpoint for creating a new user session or signing out. paths: /sessions: get: tags: - Sessions summary: Gets details about the current user, as identified by the session / security… description: '' operationId: getCurrentUser security: - basicAuth: [] - sessionid: [] responses: '200': description: Successful retrieval of the main data of the user of the API. content: application/xml: schema: $ref: '#/components/schemas/User' application/json: schema: $ref: '#/components/schemas/User' '401': description: The supplied session is not valid or has already expired. post: tags: - Sessions summary: Sign in the user using basic authentication. description: '' operationId: signIn security: - basicAuth: [] responses: '200': description: Successful sign-in. Session is returned as JSESSIONID cookie. '401': description: Could not authenticate the user due to incorrect details in the Authorization header. delete: tags: - Sessions summary: Sign out the user of the session description: '' operationId: signOut security: - sessionid: [] responses: '204': description: Successful sign-out. '401': description: The supplied session is not valid or has already expired. components: schemas: User: type: object properties: username: type: string sessionId: type: string roles: type: array uniqueItems: true items: type: string roleTypes: type: array uniqueItems: true items: type: string name: type: string xml: name: user description: Essential information about the user, including the session. securitySchemes: sessionid: description: Once the session id is known, it can be used for authentication until expired. The provided session id is used (and validated) on making an actual request. type: apiKey name: JSESSIONID in: header basicAuth: type: http scheme: basic description: Basic authentification using the CKM username and password. The provided credentials are used (and validated) on making an actual request. externalDocs: description: Find out more about openEHR and the Clinical Knowledge Manager (CKM) url: http://www.openehr.org