{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/nexpose-client/issues/222","repository_url":"https://api.github.com/repos/rapid7/nexpose-client","labels_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/222/comments","events_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/222/events","html_url":"https://github.com/rapid7/nexpose-client/issues/222","id":151904615,"number":222,"title":"Past Scans Throwing n API Error","user":{"login":"TheCaucasianAsian","id":3781589,"avatar_url":"https://avatars.githubusercontent.com/u/3781589?v=3","gravatar_id":"","url":"https://api.github.com/users/TheCaucasianAsian","html_url":"https://github.com/TheCaucasianAsian","followers_url":"https://api.github.com/users/TheCaucasianAsian/followers","following_url":"https://api.github.com/users/TheCaucasianAsian/following{/other_user}","gists_url":"https://api.github.com/users/TheCaucasianAsian/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCaucasianAsian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCaucasianAsian/subscriptions","organizations_url":"https://api.github.com/users/TheCaucasianAsian/orgs","repos_url":"https://api.github.com/users/TheCaucasianAsian/repos","events_url":"https://api.github.com/users/TheCaucasianAsian/events{/privacy}","received_events_url":"https://api.github.com/users/TheCaucasianAsian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-29T15:59:54Z","updated_at":"2016-04-30T08:24:59Z","closed_at":"2016-04-29T16:35:17Z","body":"Here is my code:\r\nscans = nsc.past_scans\r\nscans.each do |scan|\r\n\tputs \"Site ID: \" << scan.site_id.to_s\r\n\tputs \"Start Time\" << scan.start_time.to_s\r\n\tputs \"*************************************\"\r\nend\r\n\r\nI dug into the error:\r\nC:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/lib/nexpose/a\r\njax.rb:170:in `request': NexposeAPI: GET request to /ajax/user_pref_set.txml?nam\r\ne=global-completed-scans.rows&value= failed. request body:  (Nexpose::APIError)\r\n        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/\r\nlib/nexpose/ajax.rb:34:in `get'\r\n        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/\r\nlib/nexpose/ajax.rb:267:in `set_rows'\r\n        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/\r\nlib/nexpose/ajax.rb:225:in `ensure in preserving_preference'\r\n        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/\r\nlib/nexpose/ajax.rb:225:in `preserving_preference'\r\n        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nexpose-3.3.1/\r\nlib/nexpose/scan.rb:374:in `past_scans'\r\n        from connect2.rb:398:in `<main>'\r\n\r\nBy adding code into Ajax.rb, here is the-\r\nrequest: #<Net::HTTP::Get:0x2b51b00>\r\nand the response: #<Net::HTTPInternalServerError:0x27cf468>\r\nI haven't checked if I can call the old xml api with fiddler yet, but I might once I commit to waking up.\r\n\r\nThanks for all your help!\r\n-Bryan\r\n"},"comment":{"url":"https://api.github.com/repos/rapid7/nexpose-client/issues/comments/215946354","html_url":"https://github.com/rapid7/nexpose-client/issues/222#issuecomment-215946354","issue_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/222","id":215946354,"user":{"login":"TheCaucasianAsian","id":3781589,"avatar_url":"https://avatars.githubusercontent.com/u/3781589?v=3","gravatar_id":"","url":"https://api.github.com/users/TheCaucasianAsian","html_url":"https://github.com/TheCaucasianAsian","followers_url":"https://api.github.com/users/TheCaucasianAsian/followers","following_url":"https://api.github.com/users/TheCaucasianAsian/following{/other_user}","gists_url":"https://api.github.com/users/TheCaucasianAsian/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCaucasianAsian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCaucasianAsian/subscriptions","organizations_url":"https://api.github.com/users/TheCaucasianAsian/orgs","repos_url":"https://api.github.com/users/TheCaucasianAsian/repos","events_url":"https://api.github.com/users/TheCaucasianAsian/events{/privacy}","received_events_url":"https://api.github.com/users/TheCaucasianAsian/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T08:24:59Z","updated_at":"2016-04-30T08:24:59Z","body":"You guys are awesome!!  Thank you for getting on top of these so quickly!!"}}