Logout event is not captured in Event logs when user logout REST api method is called

Hi,
I have configured events to capture user logout events in keycloak (version 25.0.5).
When I do user login using keycloak account-console, login and logout event are captured with detail timestamp, userid and client id.
But when I use the REST api POST method from postman for example: (http://localhost:8080/admin/realms/test/users/943fc1a4-c77d-4cde-8943-66e93dfbffe1/logout or http://localhost:8080/admin/realms/test/logout-all) the user logout event is not captured for the event type LOGOUT.
Please help me how to capture the user LOGOUT event while calling keycloak logout REST API.

Thank you

What you call “REST api” is the ADMIN REST API, for administrational purposes. That’s not meant for users logout themselves, but only for administrators invalidating user sessions. The Admin REST API will not create user events.

For proper logout, see https://www.keycloak.org/docs/latest/server_admin/index.html#_oidc-logout