Use better rule for attach api url