I have a Lambda function that has an exposed API Gateway endpoint, and I can get the URL for that via the AWS console. However, I would like to get that URL via API call. Neithe
Your API Gateway endpoint URL doesn't get exposed via an API call. However, since the URL of the API follows a certain structure, you could get all the necessary pieces and create the URI within your code.
https://API-ID.execute-api.REGION.amazonaws.com/STAGE
You could use apigateway:rest-apis to get your API-ID and restapi:stages to get the stage corresponding identifier.