MT#5599 API: remove middleware handling.