如何访问 GSA API
我有 Google Search Appliance,正在尝试访问 API 以下载事件日志。我在 Windows 7 命令行上通过 cygwin 使用curl。
我能够使用获取身份验证令牌
curl -X POST -d Email=username -d Passwd=password "http://ip.ad.dr.ess:8443/accounts/ClientLogin"
我的问题是,当我尝试自己检索偶数日志时:
curl -k -X GET -d query=User -H "Content-type: application/atom+xml" -H "Authorization: GoogleLogin Auth=e73265ce254f7c4afbcbee1743a56e81" "http://10.29.5.5:8000/feeds/logs/eventLog"
curl 说它无法到达主机:
curl: (7) couldn't connect to host
非常感谢任何帮助使其正常工作的帮助。
I have a Google Search Appliance and am trying to access the API to download the Event Logs. I am using curl through cygwin on the Windows 7 command line.
I am able to get an authentication token using
curl -X POST -d Email=username -d Passwd=password "http://ip.ad.dr.ess:8443/accounts/ClientLogin"
My problem is that when I attempt to retrieve the even logs themselves:
curl -k -X GET -d query=User -H "Content-type: application/atom+xml" -H "Authorization: GoogleLogin Auth=e73265ce254f7c4afbcbee1743a56e81" "http://10.29.5.5:8000/feeds/logs/eventLog"
curl says that it cannot reach the host:
curl: (7) couldn't connect to host
Any help in getting this to work is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查您是否可以远程登录到该 IP 地址。如果出现超时,您应该检查防火墙等。
这看起来像是一个比 GSA 或 Curl 问题更常见的网络问题。
Check if you can telnet to the IP-address. If you get a timeout there you should check firewalls etc.
This looks like a more generic network problem than a problem with either the GSA or Curl.
问题出在我的 GSA 配置上。 GSA 配置为需要通过 HTTPS 进行通信。由于所有 GSA 默认使用端口 8000 上的 HTTP 流量和 8443 上的 HTTPS 流量,因此通过发送以下内容解决了我的问题:
The problem turned out to be the configuration with my GSA. The GSA is configured to require communication over HTTPS. Because all GSAs default to HTTP traffic over port 8000 and HTTPS traffic over 8443, my problem was solved by sending the following: