add opsapi for handling cli requests.