title: How to access Gerrit Rest API using python
body: <p>Firstly, I've a limited gerrit understanding.</p>
  
  <p>I'm trying to access Gerrit Rest API using python, but not able to do so. I want to fetch all the information related to accounts (commits, reviews).</p>
  
  <pre><code>from requests.auth import HTTPDigestAuth
  from pygerrit2 import GerritRestAPI, HTTPBasicAuth
  auth = HTTPBasicAuth('user', 'password')
  from pygerrit2 import GerritRestAPI
  rest = GerritRestAPI(url='https://xxx.xx.xxx.xxx.com/', auth = auth)
  changes = rest.get("changes/?q=is:open&amp;q=is:close&amp;q=all&amp;o=DETAILED_ACCOUNTS&amp;o=ALL_REVISIONS&amp;o=ALL_COMMITS&amp;o=ALL_FILES&amp;o=MESSAGES", headers={'Content-Type': 'application/json'})
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>ConnectionError: HTTPSConnectionPool(host='xxx.xx.xxx.xxx.com', port=443): Max retries exceeded with url: /login/a/changes/?q=is:open&amp;q=is:close&amp;q=all&amp;o=DETAILED_ACCOUNTS&amp;o=ALL_REVISIONS&amp;o=ALL_COMMITS&amp;o=ALL_FILES&amp;o=MESSAGES (Caused by NewConnectionError('&lt;urllib3.connection.VerifiedHTTPSConnection object at 0x825bad0&gt;: Failed to establish a new connection: [Errno 110] Connection timed out',))
  </code></pre>
  
  <p>I'm able to fetch the information if I copy paste the query in the url, but not thru python. How to do it?
  Please comment / edit if question is not clear.
  Thanks</p>