Skip to main content
This feature forwards user sign-in/sign-out events to external systems (Elasticsearch, Kafka, Webhook, etc.) through connectors. It applies to API Manager (system users) and API Portal (portal users).

Overview

Apinizer tracks user sign-in/sign-out events in two layers: For both layers:
  • You can configure whether records are written to MongoDB.
  • You can define one or more connector targets to send logs to external systems.

1. API Manager – System User Login Log

1.1 Where to Configure

System Settings → Log Settings → Login Log

1.2 Screen Fields

To view Management Console login records, see Login Records.

1.3 Adding a Connector

  1. In the Login Log section, click the + button in the top-right corner of the connector table.
  2. In the dialog, select a connection configuration (ConnectionConfig) previously defined for the environment.
  3. Use the toggle to set the connection Active or Inactive.
Connectors are defined per environment. A connection configuration must first be created on the Connection Configuration screen and assigned to the relevant environment.

1.4 Events Emitted

Sign-out (logout) events are not logged at this time.

1.5 JSON Payload Sent to Connectors

1.6 Failed Login Example


2. API Portal – Portal User Login Log

2.1 Where to Configure

Portal Management → [Select Portal] → Settings → Login Log tab API Portal Settings Login Log tab: save to database and send to connectors

2.2 Screen Fields

Portal login log settings are independent per portal. Each portal can have its own connectors.
To view and filter portal login records, see API Portal Login Logs.

2.3 Adding a Connector

The steps match API Manager:
  1. On the Login Log tab, click + in the connector table.
  2. Select the appropriate connection configuration and save.

2.4 Events Emitted

2.5 JSON Payload Sent to Connectors


3. Supported Connector Types

All Apinizer connector types can be used for login logs. Common scenarios:
When the Database connector type is selected, login log records are written to the log_LoginLog table. This table is not created automatically — you must create it manually before enabling the connector. See Apinizer Log Table Creation Commands for the CREATE TABLE statement for each supported database type (Oracle, MySQL/MariaDB, PostgreSQL, SQL Server).

4. Multiple Connectors

You can define multiple connectors for both Manager and Portal. Each connector can be toggled Active or Inactive independently. When a connector is inactive, nothing is sent to that connector even if a log event occurs.

5. Turning Off Database Persistence

When the Save to Database toggle is off, Apinizer does not write login log records to MongoDB. Logs are only forwarded to the configured connectors.
If Save to Database is off and all connectors are inactive, login log records may be lost. At least one active target is recommended.


7. Known Limitations / Roadmap

  • Logout not logged: Only LOGIN_SUCCESS and LOGIN_FAILURE are supported. User sign-out (LOGOUT) is not logged yet.
  • Portal logout: Portal user sign-out is also not logged.
  • Source code: A LOGOUT event type could be added by updating UserLoginService.logout() and the portal logout flow.