refactor API can be used on XML , JSON and APIWEBROWSER