Update API for preprocessing query params