finally is working the endpoints api call