-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -Fields parameter to Get-GSDriveFileList #177
Comments
hey @WJurecki - This was actually brought up in an issue a while ago, and it appears that the difference between the .NET SDK when leaving the default value for I'm adding it in, but forewarning that it doesn't add a performance gain as you'd expect. Here is my testing after adding, you can see that getting a subset of fields performs roughly the same as getting all of them. Note that the previous setup was defaulting to |
## 2.26.2 * [Issue #177](#177) * Added: Fields parameter to Get-GSDriveFileList * [Issue #178](#178) * Fixed: Start-GSDriveFileUpload failing on PowerShell 4.0 * [Issue #179](#179) * Added: Ims parameter to both New-GSUser and Update-GSUser * Added: Add-GSUserIm function to create correct type for new Ims parameter. * Miscellaneous * Added: Clear-PSGSuiteServiceCache to clear the cache and dispose of any remaining open web clients. * Improved overall service caching. * Added: Support for Cloud-Identity licenses for Get-GSUserLicense * Added: OutputType for all applicable Helper functions (i.e. Add-GSUserIm)
## 2.26.2 * [Issue #177](#177) * Added: `Fields` parameter to `Get-GSDriveFileList` * [Issue #178](#178) * Fixed: `Start-GSDriveFileUpload` failing on PowerShell 4.0 * [Issue #179](#179) * Added: `Ims` parameter to both `New-GSUser` and `Update-GSUser` * Added: `Add-GSUserIm` function to create correct type for new `Ims` parameter. * Miscellaneous * Added: `Clear-PSGSuiteServiceCache` to clear the cache and dispose of any remaining open web clients. * Improved overall service caching. * Added: Support for `Cloud-Identity` licenses for `Get-GSUserLicense` * Added: `OutputType` for all applicable Helper functions (i.e. `Add-GSUserIm`)
## 2.26.2 * [Issue #177](#177) * Added: Fields parameter to Get-GSDriveFileList * [Issue #178](#178) * Fixed: Start-GSDriveFileUpload failing on PowerShell 4.0 * [Issue #179](#179) * Added: Ims parameter to both New-GSUser and Update-GSUser * Added: Add-GSUserIm function to create correct type for new Ims parameter. * Miscellaneous * Added: Clear-PSGSuiteServiceCache to clear the cache and dispose of any remaining open web clients. * Improved overall service caching. * Added: Support for Cloud-Identity licenses for Get-GSUserLicense * Added: OutputType for all applicable Helper functions (i.e. Add-GSUserIm)
Hey @WJurecki - v2.26.2 is out now with Fields support for |
Hi @scrthq, thanks for adding the -Fields option. It appears these is an issue with a logic of this new feature. When executing This further shows that the issue with Get-GSDriveFileList limits pagesize to 100 #175 must be a vendor limit of the returned result size because when specifying only a few fields pagesize works up to 1,000. |
Good catch @WJurecki ! See my note here on that PR where that code bit changed. Very accurate analysis. Checking out the difference in behavior now and will get it resolved asap if impacting! |
Confirmed the difference, getting a fix out in a few minutes 💪 thanks again! |
## 2.26.4 * [Issue #177](#177) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ * Fixed: Fields parameter Get-GSDriveFileList would not set correctly with the default fields value, breaking the expected experience. Restored the same functionality
Fixed and deployed in v2.26.4! |
I would like to be able to specify what fields to have returned to increate performance.
For example I know that in my code I am only ever going to use the
parents
,name
,id
, andfolderColorRgb
properties of the objects returned and therefore would like to increase performance by not having the remaining properties collected and returned.I would like a
-Fields
parameter added that accepts property names.Such as:
Get-GSDriveFileList -Fields 'parents,name,id,folderColorRgb'
orGet-GSDriveFileList -Fields 'parents','name','id','folderColorRgb'
This example would result in the value assigned to
$request.Fields
at line 116 beingfiles(parents,name,id,folderColorRgb),kind,nextPageToken
API Explorer confirms this is the proper format for the
$request.Fields
For compatibility with existing behavior you could simply have this new
-Fields
parameter default to*
sincefiles(*),kind,nextPageToken
is a valid request that returns the current result set.Performance Tips discusses this and shows proper formatting.
The text was updated successfully, but these errors were encountered: