我有一個Google Search Appliance,正試圖訪問該API來下載事件日誌。我在Windows 7命令行上通過cygwin使用curl。如何訪問GSA API
我能夠得到使用
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: (7) couldn't connect to host
任何幫助獲得這項工作非常感謝。
我有同樣的問題,但我正在嘗試使用以下代碼導入com.google.enterprise.apis.client.GsaClient訪問java中的GSA; GsaClient myClient = new GsaClient(「gsaAddr」,gsaPort,「myUserId」,「myPassword」);我的問題是如何在java中添加身份驗證令牌?任何幫助非常感謝 – Yaba