What is the difference between endoscopy and colonoscopy?

The difference. Is usually endoscopy refers to an upper scoping procedure through the mouth, esophagus, stomach and first portion of your duodenum or small intestine. Colonoscopy evaluates the colon or large intestine and performed through the anus.
General vs Specific. The term 'endoscopy' encompasses a great many procedures where a scope (endoscope) of some kind is inserted into some oriface for some purpose (looking through the mouth into the stomach or small intestine, looking through the nose up into the sinuses, etc). 'colonoscopy' specifically refers to inserting a 'colonoscope' into the rectum and viewing the entire colon.