function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
reettik mitrareettik mitra 

how to get the organization's storage usage data

I have used LIMITS api but it returns the storage info in MB due to which if my max storage is 5MB and I have used 500kb then the remaining storage must be 4.5MB but the LIMITS API returns remaining5MB(rounded off).Is there any way that I can get the exact storage used by the organization. And I used site scraping on storage usage page in setup and recieved this error:-
"System.VisualforceException: org.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded"
User-added imageUser-added image
AnudeepAnudeep (Salesforce Developers) 
Have you also tried checking the storage usage from setup?

To monitor storage usage, navigate to  'Setup -> In quick find type 'Storage Usage' and click on it -> Your org-wide storage usage and allocations will display on the said page.

Please review the knowledge article link of Monitor Data and Storage Resources to learn more

Let me know if this helps, if it does, please close the query by marking it as solved. It may help others in the community. Thank You!
reettik mitrareettik mitra
But I want the storage information in apex for custom reports.
I have managed to get the data through page scraping from developer console but however I am not able to get the same when I am using lwc .
How to do Page Scraping using lwc.