Added REST API for retrieving commands