Endoscopy is a procedure that allows a doctor to view the inside of a person's body. Originally, endoscopy was only used in the esophagus, stomach, and colon. Now, doctors use endoscopy to diagnose diseases of the ear, nose, throat, heart, urinary tract, joints, and abdomen. This procedure can be used to investigate unusual symptoms or treat a range of conditions. It can also be performed to carry out a biopsy, where a small tissue sample is taken for further analysis.