Endoscopy is a medical procedure that allows healthcare providers to view the inside of a patient's body using an instrument called an endoscope. This device is a long, flexible tube with a light and camera attached to it, which transmits images to a monitor. Endoscopy is commonly used for diagnostic purposes, to identify abnormalities in organs, tissues, and other structures within the body.