Connection to API.