boxcli icon indicating copy to clipboard operation
boxcli copied to clipboard

Pull more than 1000 results for box files:versions when using --json

Open Michael-B-23 opened this issue 5 years ago • 3 comments

  • [x] I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
  • [x] I have checked that the [API documentation][api-docs] doesn't solve my issue.
  • [x] I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
  • [x] I have searched [Issues in this repo][github-repo] and my issue isn't already reported.

Description of the Issue

I'm trying to find out how to deal with a file that has more than 1000 versions when using --json. When running a box files:versions --json command, it only returns 1000 total, even if the file itself has more than that. We have some files with as many as 13000+ versions, and I'd like to figure out how to access them via powershell (mainly so I can delete them).

I don't know if there is a way to offset or paginate the returned array. If this is not possible, is there a way to access properties like foreach ($v in $version) {$v.created_at} without doing the --json | convertfrom-json thing?

image

Steps to Reproduce

$version = box files:versions FILEIDHEREWITHMORETHAN1KVERSIONS --json | ConvertFrom-Json $version.count always equals 1000 (when --json is not used, it returns the correct amount)

Versions Used

Box CLI: 2.7.0 Operating System: Windows 10

Michael-B-23 avatar Nov 15 '20 17:11 Michael-B-23

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Aug 02 '22 21:08 stale[bot]

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Sep 08 '22 15:09 stale[bot]

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box CLI and feel free to open another PR/issue at any time.

stale[bot] avatar Sep 15 '22 16:09 stale[bot]