Added sample api middleware and client usage