Home > Back-end >  What is the query format for "< string > array(csv)" schema in Keycloak Admin API?
What is the query format for "< string > array(csv)" schema in Keycloak Admin API?

Time:09-17

In Keycloak Admin REST API, I am trying to perform GET /{realm}/events request for getting events by realm.

In the docs it says to filter by type of event you add the query param < string > array(csv). However that schema is not exactly clear, for example how to get both LOGIN and LOGOUT events?

So far I have tried formats like ?type=LOGIN,LOGOUT and ?type='LOGIN','LOGOUT' but it did not work.

CodePudding user response:

For anyone who faced this situation, after several trials and looking through the Keycloak source code I found out that what is meant by < string > array(csv) is to add the query like this: ?type=LOGIN&type=LOGOUT.

  • Related