I would like to get a list of files and folders in the root directory without having to sort through all the files. Is there a query that would do this?
The root folder can also be addressed with a special alias named "root", so you can get all files and folders in the root with the following query:
https://www.googleapis.com/drive/v2/files?q='root' in parents
Remember to escape the URL if not using one of the client libraries (they automatically take care of it).
For more details about the search query language, check https://developers.google.com/drive/search-parameters