box / box/boxcli

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

Open
#220 3 comments 0 reactions 2 assignees Claimed by @sujaygarlanka View on GitHub
bug dontstale question
Dominant language
JavaScript
Stars
284
Forks
67
Avg merge
6h 45m
Merged PRs (30d)
4

Description

- [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](https://user-images.githubusercontent.com/18122914/99193703-468d7d00-2740-11eb-94a3-c32f20139392.png)

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.