New command: `spo report siteversionstorageusage`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 413
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 21
Description
Usage
m365 spo report siteversionstorageusage [options]
Description
Generate a version storage usage report for a site or OneDrive account
Options
| Option | Description |
|---|---|
--siteUrl <siteUrl> |
URL of the site collection to target. |
--fileUrl <fileUrl> |
Server-relative URL of the file where the report should be stored. |
--status |
Get the status of a report that is being generated. |
Examples
Create a file version usage report of a specific site
m365 spo report siteversionstorageusage --siteUrl "https://contoso.sharepoint.com/sites/Marketing" --fileUrl "/sites/Marketing/Reports/FileUsage.csv"
Get the progress of a specific file version usage report
m365 spo report siteversionstorageusage --siteUrl "https://contoso.sharepoint.com/sites/Marketing" --fileUrl "/sites/Marketing/Reports/FileUsage.csv" --status
Default properties
No response
Additional Info
API request
Create report
POST https://contoso.sharepoint.com/sites/Marketing/_api/Site/StartFileVersionExpirationReport(reportFileUrl='/sites/Marketing/Reports/StorageReport.csv')
Get report status
POST https://contoso.sharepoint.com/sites/Marketing/_api/Site/GetProgressForFileVersionExpirationReport(reportFileUrl='/sites/Marketing/Reports/StorageReport.csv')
Docs
The file version report generation job completes asynchronously over the next few days. The time it takes for the report to complete depends on the size of your library or site. For smaller sites or libraries, it takes over 24 hours to complete. For larger ones, it takes a few days to complete.
[!IMPORTANT]
While the job is being processed, you can see the report file being gradually populated. Do not update the file during this time. It will cause the job to fail. Check the progress of the report generation to confirm that the report is fully populated and ready to process.
If you wish to cancel an in-progress report generation, you may simply delete the report file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing m365 spo report commands and their tests, then compare their command options and SharePoint API calls with the documented StartFileVersionExpirationReport and GetProgressForFileVersionExpirationReport endpoints. Done means the new command supports report creation and status checks with --siteUrl, --fileUrl, and --status, and its tests cover the documented examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100