Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to get user's storage usage #26829

Closed
PVince81 opened this issue Dec 16, 2016 · 6 comments
Closed

API to get user's storage usage #26829

PVince81 opened this issue Dec 16, 2016 · 6 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Dec 16, 2016

Use cases:

  • an admin wants to check how much storage is used vs quota by every user (storage report)
  • an admin wants to check the storage usage vs quota of a specific user

If we decide to add this on the provisioning API, I suggest to add a new specific endpoint to query storage usage data + quota. We should not reuse the existing endpoints because adding this info could make these calls slower, even for those who are not interested in the extra values.

Estimate 4-5 md (which includes API design)

Thoughts ? @hodyroff @pmaier1 @DeepDiver1975

@PVince81
Copy link
Contributor Author

For reference, the magic SQL query to find that information: #1344 (comment)

@PVince81
Copy link
Contributor Author

Already available through provisioning API:

  % curl -X GET --user admin:admin http://localhost/owncloud/ocs/v1.php/cloud/users/admin
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message/>
 </meta>
 <data>
  <enabled>true</enabled>
  <quota>
   <free>1073651712</free>
   <used>163</used>
   <total>1073651875</total>
   <relative>0</relative>
  </quota>
  <email/>
  <displayname>admin</displayname>
  <two_factor_auth_enabled>false</two_factor_auth_enabled>
 </data>
</ocs>

@tummimadhu
Copy link

tummimadhu commented Jan 6, 2018

This Data is shown only for Admin under quota tag i.e
image

But for user it does not show fields under quota, it just GET's
image

Any Idea how to get these fields for quota in user as well???

Thanks in Advance.

@PVince81
Copy link
Contributor Author

PVince81 commented Jan 8, 2018

@tummimadhu please open a new issue and use the issue template there and specify your OC version and also more details about what you mean with "user". AFAIK regular users cannot use the provisioning API unless they are group admins.

@tummimadhu
Copy link

Sure, reported a fresh issue and it also worked as the user needs to be logged in to get the quota details

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants