add API rewrites