Upper GI endoscopy is a procedure in which a doctor uses an endoscope—a flexible tube with a camera—to see the lining of your upper GI tract. A gastroenterologist, surgeon, or other trained health care professional performs the procedure, most often while you receive light sedation to help you relax.