How to query custom variables using event category segmentation

I tried this :

            $stats = \Piwik\API\Request::processRequest('CustomVariables.getCustomVariables', array(
                'idSite' => $idSite,
                'period' => 'day',
                'date' => '2022-02-01',
                'flat' => '1',
                "segment" => 'eventCategory=='.urlencode($eventName)  

but it’s weirdly returning some other rows that belong to other events I didn’t request, but it’s not returning all the rows, when I remove the segmentation, it’s still returning the same response.

I’m trying to do the equivalent of this sql query :

SELECT  * from matomo_log_link_visit_action mllva 
where idaction_event_category  = 5598
and server_time > '2022-02-01 09:06:43.000'

where 5598 is the id of the event category in $eventName.
what am I missing ?