title: how to pull data from influxdb via API call?
body: <p>i have pushed the data using the below api call in the database "dbvishnutest"</p>
  
  <pre><code>curl -XPOST http://&lt;localhost&gt;:8086/write?db=dbvishnutest --data-binary "weather,location=us-midwest temperature=82 1465839830100400200"
  </code></pre>
  
  <p>Now i am trying to pull back the data using the below api call .</p>
  
  <pre><code>curl -i -XPOST -G http://&lt;localhost&gt;:8086/query?pretty=true --data-urlencode "dbvishnutest" --data-urlencode "q=select * from weather where location=us-midwest"
  </code></pre>
  
  <p>i am getting the below error :</p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Type: application/json
  Request-Id: 1966e27f-dc05-11e7-8087-000000000000
  X-Influxdb-Build: OSS
  X-Influxdb-Version: 1.4.2
  X-Request-Id: 1966e27f-dc05-11e7-8087-000000000000
  Date: Fri, 08 Dec 2017 10:46:51 GMT
  Transfer-Encoding: chunked
  
  {
      "results": [
          {
              "statement_id": 0,
              "error": "database name required"
          }
      ]
  }
  </code></pre>
  
  <p>i am new to influx db , i tried fix i was not able to fix this.</p>
  
  <p>Can someone correct my mistake please ? thanks in advance :) </p>