question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

googleapi.drive.files.get returns only a few fields of each file

See original GitHub issue

I tried to use googleapi.drive('v3').files.get, and in the response.files list, each object only contains four fields: name, id, kind and mime_type.

However, the API should return a lot more than those. (e.g. the url and owner)

Thanks!

fyi: https://developers.google.com/drive/v2/reference/files/get

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
kevinob11commented, Nov 28, 2017

For anyone looking here who wants to see all fields for testing you can send in '*' for the fields param to get all fields back.

2reactions
juanramoncarcelescommented, Oct 24, 2019

Since the syntax on how to specify just the desired fields was not clear to me following the documentation I leave here an example. Just create a string and separate them by commas: let request = gapi.client.drive.files.get({ fileId: 'FILE ID', fields: 'name, trashed' });

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return specific fields for a file | Google Drive
To determine the fields you can return using the fields parameter, visit the documentation page of the resource you are querying. For example,...
Read more >
Is there a way to list all fields for a file on the Google Drive API?
To return all the fields set fields equal to * .setFields("*"). As for your issue it sounds like a bug to me you...
Read more >
How to Use the Google Drive API with JavaScript - Medium
Before using any Google APIs, we'll need to get past authentication. ... Using the drive.files.list method, we can see every file our service...
Read more >
Manage Drive labels - Google Workspace Admin Help
Example of using a badged label: Create a label named File Sensitivity. This label could have the field options: Top Secret, Internal, Public,...
Read more >
File (Drive API v3-rev20221219-2.0.0)
com.google.api.services.drive.model.File. All Implemented Interfaces: Cloneable, ... Links for exporting Docs Editors files to specific formats.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found