title: How to get list of files by folder on Google Drive API
body: <p>I am trying to build a web UI for users to navigate his/her Google Drive and select one or more documents to be referenced later on in a website from a DB. I am currently building a web interface using .NET.
  The problem I am facing is that I can not find a single function to get a list of files by folder Id.
  I tried using:</p>
  
  <p><em>...www.googleapis.com/drive/v2/files/BB0CHANGEDIDF5waGdzbUQ5aWs/children</em></p>
  
  <p>…but that will only give the files reference ID of the files within the folder (the so called children resource item), which means I have to loop through those files and create a call for each one of them in order to get all the metadata I need for my UI.
  Unfortunately..</p>
  
  <p><em>...www.googleapis.com/drive/v2/files</em></p>
  
  <p>..will list ALL my files with no filtering options by folder.
  I would like to know if there is an efficient way of extracting a folder&amp; file list from a single call to the Drive server by for a specific folder.</p>
  
  <p>I also tried this (<a href="https://stackoverflow.com/questions/11400669/getting-a-list-of-files-by-folder-on-drive-sdk/24719894#24719894">based on answer to the similar issue</a>):
  I am using Fiddler to do direct calls to the api. When I use this to make the call `</p>
  
  <p><em>...www.googleapis.com/drive/v2/files?q='BB0CHANGEDIDF5waGdzbUQ5aWs'</em></p>
  
  <p>I get an error: </p>
  
  <pre><code>{
   "error": {
    "errors": [
     {wrongID
      "domain": "global",
      "reason": "invalid",
      "message": "Invalid Value",
      "locationType": "parameter",
      "location": "q"
     }
    ],
    "code": 400,
    "message": "Invalid Value"
   }
  }
  </code></pre>
  
  <p>Even using <a href="https://developers.google.com/drive/v2/reference/files/list" rel="noreferrer">google's test page</a> does not do it.
  It looks like the "files" endpoint does not accept any parameter. </p>
  
  <p>There has to be a way to achieve this! </p>
  
  <p>Thank you for your help</p>