Endoscopy often is performed to examine a patient's digestive tract or lower intestine. Using an endoscope, or flexible tube with an attached light and camera, doctors can obtain a clear view of the affected area as the scope passes through the mouth into the stomach (upper endoscopy) or through the rectum into the large intestine (colonoscopy), projecting the image onto a color television monitor.