openapi: 3.2.0 info: title: Folio Log Events API version: v1 description: 'Operations tagged logEvents across 2 of this provider''s published API definitions: folio-mod-login-keycloak-openapi.json, folio-mod-login-keycloak-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: http://localhost:8081 description: Locally deployed server tags: - name: logEvents paths: /authn/log/events: get: description: Returns a list of events retrieved from storage operationId: getLogEvents tags: - logEvents parameters: - $ref: '#/components/parameters/length' - $ref: '#/components/parameters/start' - $ref: '#/components/parameters/query' responses: '200': description: Log events content: application/json: schema: $ref: '#/components/schemas/logEventCollection' '400': $ref: '#/components/responses/badRequestResponse' '404': $ref: '#/components/responses/entityNotFoundResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Get log events x-summary-source: derived post: description: Saves received event into the storage operationId: saveLogEvent tags: - logEvents requestBody: content: application/json: schema: $ref: '#/components/schemas/logEvent' responses: '201': description: Saved Log event content: application/json: schema: $ref: '#/components/schemas/logResponse' '400': $ref: '#/components/responses/badRequestResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Save log event x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /authn/log/events/{eventId}: delete: description: Saves received event into the storage operationId: deleteLogEvent tags: - logEvents parameters: - $ref: '#/components/parameters/eventId' responses: '204': description: No content response '404': $ref: '#/components/responses/entityNotFoundResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Delete log event x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server components: parameters: eventId: in: path required: true name: eventId description: Event Identifier schema: type: string query: in: query name: query description: A query string to filter users based on matching criteria in fields. required: false schema: type: string example: '10' length: in: query name: length description: The maximum number of results to return. required: false schema: type: integer minimum: 1 default: 10 example: 10 start: in: query name: start description: The starting index in a list of results (starts at one). schema: type: integer minimum: 1 default: 1 schemas: parameter: $schema: http://json-schema.org/draft-04/schema# id: parameter.json title: Key/Value Parameter Schema description: List of key/value parameters of an error type: object properties: key: description: Parameter key type: string value: description: Parameter value type: string logEventType: $schema: http://json-schema.org/draft-04/schema# id: logEventType.json title: Log Event Type Schema description: Log event type type: string enum: - PASSWORD_RESET - PASSWORD_CREATE - PASSWORD_CHANGE - SUCCESSFUL_LOGIN_ATTEMPT - FAILED_LOGIN_ATTEMPT - USER_BLOCK metadata: $schema: http://json-schema.org/draft-04/schema# id: metadata.json title: Metadata Schema description: Record metadata type: object properties: createdDate: description: Date and time when the record was created type: string createdByUserId: description: ID of the user who created the record (when available) type: string createdByUsername: description: Username of the user who created the record (when available) type: string updatedDate: description: Date and time when the record was last updated type: string updatedByUserId: description: ID of the user who last updated the record (when available) type: string updatedByUsername: description: Username of the user who last updated the record (when available) type: string logEventCollection: $schema: http://json-schema.org/draft-04/schema# id: logEventCollection.json title: Log Event Collection Schema description: Event List type: object properties: loggingEvent: description: Event log with a list of events id: eventData type: array items: $ref: '#/components/schemas/logEvent' totalRecords: description: Number of entries in the event log type: integer required: - loggingEvent - totalRecords parameters: $schema: http://json-schema.org/draft-04/schema# id: parameters.json title: List of Parameters Schema description: List of key/value parameters of an error type: array items: $ref: '#/components/schemas/parameter' errorCode: $schema: http://json-schema.org/draft-04/schema# id: errorCode.json title: Error Code Schema description: Error message code type: string enum: - unknown_error - service_error - validation_error - not_found_error - found_error - token.parse.failure - token.refresh.unprocessable - token.logout.unprocessable - unauthorized_error error: $schema: http://json-schema.org/draft-04/schema# id: error.json title: Error Schema description: An error object type: object properties: message: type: string description: Error message text type: type: string description: Error message type code: description: Error message code $ref: '#/components/schemas/errorCode' parameters: description: List of key/value parameters of an error $ref: '#/components/schemas/parameters' logEvent: $schema: http://json-schema.org/draft-04/schema# id: logEvent.json title: Log Event Schema description: A logging event that describes the event code and basic information for logging events type: object properties: id: type: string description: The system assigned unique ID of the instance record; UUID eventType: description: Log event type $ref: '#/components/schemas/logEventType' tenant: type: string description: The tenant for which the event occurred userId: type: string description: User ID for which the event is registered. ip: type: string description: Client IP address of registered user Okapi browserInformation: type: string description: Client's browser information obtained from User-Agent http header timestamp: type: string format: date-time description: Event registration time metadata: $ref: '#/components/schemas/metadata' required: - tenant - userId - eventType additionalProperties: false errors: $schema: http://json-schema.org/draft-04/schema# id: Errors Schema description: A set of errors type: object properties: errors: description: List of errors id: errors type: array items: $ref: '#/components/schemas/error' total_records: description: Total number of errors type: integer logResponse: $schema: http://json-schema.org/draft-04/schema# id: logResponse.json title: Log Response Schema description: The log event object containing the message received from LoginAPI type: object properties: message: description: The message containing API response information type: string required: - message responses: entityNotFoundResponse: description: Error response if entity is not found by id (in json format) content: application/json: schema: $ref: '#/components/schemas/errors' badRequestResponse: description: Error response in JSON format for validation errors. content: application/json: schema: $ref: '#/components/schemas/errors' internalServerErrorResponse: description: Error response for unhandled or critical server exceptions, e.g. NullPointerException. content: application/json: schema: $ref: '#/components/schemas/errors' x-refined-from: - folio-mod-login-keycloak-openapi.json - folio-mod-login-keycloak-openapi.yml