exposing samples API on the front end