title: Navigate to folder with Google Drive API
body: <p>I need to know how to correctly use the File Search method parameters, in order to walk folder trees in the Drive API.</p>
  
  <p>Using Javascript, I've gone through the <a href="https://developers.google.com/drive/v3/web/quickstart/js" rel="nofollow">Quickstart</a>, set up the app and the API enabling in the Google Dev Console, am authorized, and can read file names at root with the <code>gapi.client.drive.files.list()</code> method, but am stuck at the point of running the <a href="https://developers.google.com/drive/v3/web/search-parameters" rel="nofollow">Files Search</a> call in order to navigate to a particular directory.</p>
  
  <p>I'm trying variants of this:</p>
  
  <pre><code>GET https://www.googleapis.com/drive/v2/files?q='0B36wII03Fph8aFhtTFN5SVRYR0U'+in+parents&amp;key={CLIENT_ID}
  </code></pre>
  
  <p>... but I'm confused as to how to call the GET request. I've never used REST calls straight from JS/HTML before, so I could just be missing something basic... but yeah, I don't really know how to use that in my code... </p>
  
  <p>I've tried to play with the query parameters on the <a href="https://developers.google.com/drive/v3/reference/files/list" rel="nofollow">Files:List</a> page, with just the fileID as a parameter, but I keep getting a 400 response:</p>
  
  <pre><code>400 OK
  - SHOW HEADERS -
  {
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "invalid",
      "message": "Invalid Value",
      "locationType": "parameter",
      "location": "q"
     }
    ],
    "code": 400,
    "message": "Invalid Value"
   }
  }
  </code></pre>
  
  <p>I'm sure it's something simple, but the pure Http Rest stuff isn't my forte... Thanks for any leads!</p>