如何正确使用Landscape On-Premises中的Landscape API?

我在Ubuntu Server 16.04上运行Landscape On-Premises(版本16.06)。 当我通过Web界面连接到服务器时,一切都按预期工作。 另外,我安装并配置了landscape-api包以通过ssh管理服务器。 当我使用Landscape API文档中描述的landscape-api时,给定命令没有任何可用的返回:

source /home/cl/landscape-api.rc landscape-api get-activities No JSON object could be decoded landscape-api get-computers No JSON object could be decoded landscape-api get-event-log No JSON object could be decoded landscape-api --json get-activities Query API Service landscape-api --json get-computers Query API Service landscape-api --json get-event-log Query API Service 

您获取的rc文件可能不正确,或者api服务未运行。 您是否在用户设置页面中复制并粘贴了您提供的景观?

检查格局服务器上的进程列表,然后查找api进程。 还要检查/var/log/landscape-server/的服务器日志。