1

When using the google drive api

I use com.google.api.services.drive.Drive.files() to iterate some files.

I noticed None of the Directory objects have permissions?

When I use the File objects, the com.google.api.services.drive.model.File.getPermissions() method always returns null.

Is there some way I can get this list method to return the permissions as well?

Otherwise I'll have to pummel the google api?

1 Answer 1

1
+50

Are you using the fields option to include permissions? I don't generally use the Java SDK, but I think look into setFields()

Sign up to request clarification or add additional context in comments.

4 Comments

So I used to go this.drive.files().get(id).execute(); Now i have to go this.drive.files().get(id).setFields(fields).execute(); Is there a way to get all the default fields?
There should always be a default set of fields, but what I did was just set up the fields string for all of the ones we actually use and explicitly use it every request
Me neither. They've changed at least once, best to be explicit for the fields you need
all i know is permissions is NOT default. thanks for all the time

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.