Reputation: 236
I'm just learning how to use Google Drive REST API. I'm currently figuring out the GET method to retrieve file resources and have run into a problem. My end goal to be able to see the permissions resource of a file in my GDrive. However, when I send a GET HTTP request for a specific file ID, I only receive four resources: mimeType, kind, id, and name. I made a dummy Google Doc to illustrate the problem and am processing my requests through Google's "Try this API" tool: https://developers.google.com/drive/api/v3/reference/files/get?apix_params=%7B%22fileId%22%3A%2213hsjqHI_yw7oO_FWDJr9BV0b6mJXD5Zlirr5I2LuLJI%22%7D
If I input my dummy fileID in the above link and press "EXECUTE," I get the following:
{
"kind": "drive#file",
"id": "13hsjqHI_yw7oO_FWDJr9BV0b6mJXD5Zlirr5I2LuLJI",
"name": "Please help",
"mimeType": "application/vnd.google-apps.document"
}
How do I get access to all of the other resources listed on https://developers.google.com/drive/api/v3/reference/files#resource ?
Upvotes: 3
Views: 3685
Reputation: 201693
You can retrieve the values of other metadata using fields
. When you use this, please click "Show standard parameters" at "Try this API" page. By this, you can see the text box for putting fields
. When you can confirm the text box, please put the values for fields
to the text box and "EXECUTE" button.
For example, when you want to retrieve the filename, file ID and permissions, please put id,name,permissions
. In this case, when your URL is modified, it becomes as follows.
If you want to retrieve all values, please use *
to the fields. In this case, when your URL is modified, it becomes as follows.
Upvotes: 5