get all endpoints for api and endpoint by id