Pregunta de entrevista de Simpaisa

What steps would you take to optimize API endpoints in java spring boot that is fetching records?