Changed url to api methods