Added a GET endpoint based on the existing code