Box CLI Space Used Per User, bulk command
Hi,
I am brand new to the Box CLI. I am slowly finding my way around, but I have a question on bulk lookups. I have a list of Box User IDs provided to me by Box I plan to run against in the CLI for deletion. However, I need to check the list of IDs I have to make sure one final time they have no zero space being used.
The Box report I got from Support has this field labeled as "Space Used (MB). How can I import a CSV file into Box through the CLI containing just the IDs and have it give me back another CSV file containing the User Email, ID, and Space Used?
I can find this for individual users using box users:search EMAIL or box users:get ID, but there doesn't seem to be any bulk commands for this.
Thanks for your time.
-
Hi ,
Here's the way that I would recommend handling it:
- Create a csv with all of the IDs that you want to gain space information for.
- Call box users:get, and supply in the --bulk-file-path=bulk-file-path option with the path to that csv. That will be the bulk option for the parameter. You should also set the --csv option to return the response data as csv.
- Pipe the response data out to another csv file to get the appropriate data.
So, the command might look something like this:
box users:get --bulk-file-path=FILE_PATH --csv > data.csv
Please sign in to leave a comment.
Comments
1 comment