You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
admin module usage_reports - credit() and users() does not report accurately. #2560
Describe the bug
I am not sure if this is a bug or simply requires clarification and updated documentation. Firstly, the credit() method is supposed to return credit usage for the organization but returns for the logged in user.
Secondly, the reported credit consumption is wildly inaccurate, or maybe you can shed light on the actual values returned? Incorrect user credit consumption also reported with users(). See information below...
To Reproduce
Steps to reproduce the behavior:
fromarcgis.gisimportGIS## access ArcGIS Online orgnaizationagol=GIS("home")
## generate an AGOLUsageReports objectusage=agol.admin.usage_reports## print credit usage dataframe## see screenshotscredits_df=usage.credit()
credits_df## users report, see screenshotsuser_usage=usage.users(
time_frame="week"
)
user_usage["data"]
error:
No error, see screenshots
Screenshots
This shows the dataframe returned from credits() This is not reflective of the overall consumption or for the logged in user.
This shows the user consumption. I am a single user organization , but I have tested on a clients org and the same results. The 'credits' is accurate, but those for individual users are not and match those returned from credits(), which is supposed to return to the whole org as stated in the docs [here](https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.AGOLUsageReports.credit), but clearly does not.
Expected behavior
Proper credits returned for whole organization when using credits() and per user when using users()
Platform (please complete the following information):
OS: Windows 11 Home
Browser Chrome / Edge
Python API Version 2.4.3
Additional context
tested in AGOL and Pro Notebooks
Activity