changing tcapi to xapi in url