fix query for apiparameters