Zend certified PHP/Magento developer

Extend API V1/products to put the not available products at the end

I want to display out of stock products at the end of the V1/products response.

I need a solution with a plugin (on MagentoCatalogApiProductRepositoryInterface maybe ?)
I tried to override getList but can’t achieve to make it work.

How can I do?