great77 Posted January 5, 2016 Share Posted January 5, 2016 Hi Guys, I am using the LogmeIn Public API to do some data collection of our machines, while other api response are working like computer status, group list, etc, I am having problem with this part where the hostidlist should be defined as intlist please look at the link of the public API for EventGetDetails.... https://secure.logmein.com/ws/api/alertEventGetDetails.aspx?help=1Others are working fine except this alerteventidlist=3,4,5,6,7,8,9,10,11,12,13 Any suggestion. It is giving OK only as response #include <array.au3>#include <File.au3>#include "WinHttp.au3";#include "JSON.au3"Local $Domain, $Domain2, $status, $ade1, $ade2, $sPublicIP, $MyFile, $objWMIService, $colSMBIOS, $Serial, $Assettag, $longlatstring, $longlatstring2, $i, $j,$aSRE, $aRegion, $ade3Local $text1,$text2,$text3,$sVar, $CurrentDrive,$mydrive, $cI_Compname,$Users, $myfile,$file, $url,$headerCL, $headerServer, $headerD, $headerLM, $headerCT,$headerAllResponse, $url, $WinHttpReq, $oErr, $headerLM, $headerD$headerSuccess,$headerAllComputerStatus$MyFile = @ComputerName & ".txt"$WinHttpReq = ObjCreate("winhttp.winhttprequest.5.1") While 1 $file = FileOpen($MyFile, 2) $url = "https://secure.logmein.com/ws/api/alertEventGetDetails.aspx?companyid=xxxxxxx&psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&alerteventidlist=3,4,5,6,7,8,9,10,11,12,13" $WinHttpReq.open("GET",$url) $WinHttpReq.send() $headerAllComputerStatus = $WinHttpReq.ResponseText MsgBox(0,"result", $headerAllComputerStatus) FileWriteLine($file, @CRLF & $headerAllComputerStatus & @CRLF) Sleep(3000) ExitLoop ; not there originally remove to allow constant exchange of APIWEndFunc _Quit() ExitEndFuncFunc _ErrorHandler() sleep(1000)EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now