Greetings!
Very new to the API for Python and Python in general. I have had some success using Jupyter Notebooks to run some feature layer downloading and cloning of various items.
I wish to be able to use the same environment to admin my AGOL and not have to use the GeoJobe Admin Tools Pro.
My big need right now is help resetting AGOL user credits back to the allotted amount they had when they joined the organization; Creator 500, Field Worker 250.
Our AGOL has renewed the credits based upon the users and types currently in the Org but it is up to me to change the credits back so they start fresh again this license year.
Using the ArcGIS API for Python | ArcGIS for Developers has helped but it is cumbersome for the novice and I learn by experience as much or more than reading.
Time is also constraint for many of my workflows and the GeoNet assistance I receive has helped my learning and time usage.
Any rate, anyone have a code snippet I can incorporate in Jupyter to achieve the credit resetting of the users?
Thanks in advance.
Solved! Go to Solution.
Hi Ronald Vanderpool,
The following script can bring the default limit for any user (e.g. user1) in AGOL:
cm = gis.admin.credits
defaultLimit = gis.admin.credits.default_limit
cm.allocate("user1", defaultLimit)
or you can reallocate any credit, in this case 100 credits is allocated to user1:
cm = gis.admin.credits
cm.allocate("user1", 100)
Thank you Mehdi!
I will give it a whirl. I looked through the arcgis.gis module and never discovered gis.admin.credits. Is there another resource I should be referencing?
Not a problem Ronald Vanderpool,
Here's the api reference link:
Way cool!!
Thanks again! 🙂