API functions returning data now have a new optional 'segment' parameter. segment can define a Visitor segment dynamically that will be applied to the report. For example, &segment=country==FR;actions>=3 (AND, OR supported. Only == and != supported currently, but easy to add more)
For API requests with a segment parameter, the reports will now be processed on the fly, and only the requested plugin report will be archived.
All plugins now define the 'segments', with a name, category, SQL field, filter, etc.