In [4]:
import arcrest
In [7]:
#login to the site
username = ""
password = ""
sh = arcrest.AGOLTokenSecurityHandler(username=username, password=password)
admin = arcrest.manageorg.Administration(securityHandler=sh)
content = admin.content
In [22]:
# Get a list of all users
def getAllUsers(admin, portalId=None):
"""
returns all the users for a given AGOL
Inputs:
portalId - unique id of the portal
admin - manageorg.Administration object
Output:
returns a list of the users
"""
start = 1
num = 100
portals = admin.portals
pp = portals.portal(portalID=portalId)
count = 0
nextStart = 0
results = []
while nextStart > -1:
users = pp.users(start=start + (num * count),
num=num)
results = results + users['users']
count += 1
nextStart = users['nextStart']
del users
return results
all_users = getAllUsers(admin=admin)
In [ ]:
# Iterate through all content in each folder for each user
for currentUser in all_users:
print("Looking at user: %s" % currentUser.username)
uc = currentUser.userContent
for folder in uc.folders:
uc.currentFolder =folder['title']
print (' --------------------------------------------')
print (" In folder: %s" % folder['title'])
for item in uc.items:
print(" - %s" % item.title)
Looking at user: AndrewSolutions
--------------------------------------------
In folder: root
- guam_replication
- fgsjklklj
- Zelda Slide Notes
- A very large fgdb
- oauth4juypter
- fdpopo
- test test
- guam_replication
- testasdfasdfass
- mapsasd
- zelda_map
- ZeldaMap
- Scripting REST
- rtwserkkk
- ZeldaMap
--------------------------------------------
In folder: Pdfs
- guam
- guam
--------------------------------------------
In folder: randomFolder
- guamds
Looking at user: Andrew_H_Solutions
--------------------------------------------
In folder: root
--------------------------------------------
In folder: Battlecreek
--------------------------------------------
In folder: Customer Complaints
--------------------------------------------
In folder: GGR473
--------------------------------------------
In folder: Leak Survey
--------------------------------------------
In folder: Misc
--------------------------------------------
In folder: Work
Looking at user: arcresttest
--------------------------------------------
In folder: root
Looking at user: BenNSolutions
--------------------------------------------
In folder: root
- SNGM_Geology_Altamira_100k
- SNGM_Geology_Altamira_100k
--------------------------------------------
In folder: Austin
- Test
--------------------------------------------
In folder: PSEG Test Project
- location_9875ef550ce1457282e87c9eb78db134
- workers_9875ef550ce1457282e87c9eb78db134
- dispatchers_9875ef550ce1457282e87c9eb78db134
- assignments_9875ef550ce1457282e87c9eb78db134
- PSEG Test Project
- PSEGTestProject_workers
- PSEGTestProject_dispatchers
Looking at user: BrianSolutions
--------------------------------------------
In folder: root
Looking at user: ChrisSolutions
--------------------------------------------
In folder: root
appProxies - attribute not implemented in UserItem class.
serviceProxyParams - attribute not implemented in UserItem class.
- CommunityParcels
- Blah
- Blah
- CommParcels
- CommParcels
--------------------------------------------
In folder: Assessor's Dashboard
--------------------------------------------
In folder: Community Layers
--------------------------------------------
In folder: CommunityAddresses
--------------------------------------------
In folder: CommunityParcels
--------------------------------------------
In folder: Control Submission
--------------------------------------------
In folder: EsriUC2014
--------------------------------------------
In folder: Floodplain Inquiry Meetup
--------------------------------------------
In folder: Land Bank
--------------------------------------------
In folder: MooseRun2015
--------------------------------------------
In folder: Photo Survey
--------------------------------------------
In folder: Real Estate Viewer
--------------------------------------------
In folder: SiteSelection
Looking at user: ClareSolutions
--------------------------------------------
In folder: root
- AntennaStructures_Wireless
- AntennaStructures_Wireless
- LeakSurveyCollectorMap_Feb
- Holistic Testing PreSurvey_Water
- CIP
- Leak Survey February Release
- 02-2016: Gas Gathering Facility Report_CP
- LeakSurveyCollectorMap_Feb
--------------------------------------------
In folder: Capital Project
- Pavement Moratoriums
- InfrastructureProjects
- Capital Project Plan Review
- External Agency Projects
- Water Distribution Project Planning
- CapitalImprovementPlan
- ExternalAgencyProjects
- Capital Improvement Plan
- Transportation Projects
- PavementMoratoriums
- Water Distribution Projects
--------------------------------------------
In folder: Consumption
- Current High Water Consumption Accounts
- 02-17-2016: Low Water Consumption Accounts
- 02-17-2016: Low Water Consumption Accounts
--------------------------------------------
In folder: Damage Assessments
- Damage Assessment Dashboard
- Damage Assessment and Collecting
--------------------------------------------
In folder: Distribution Reports
- 02-2016: Gas Distribution Facility Layers_CP
- 02-2016: Gas Distribution Facility Report_CP
- 02-2016: Gas Distribution Facility Layers
- 02-2016: Gas Distribution Facility Layers_CP
- 02-2016: Gas Distribution Facility Report_CP
--------------------------------------------
In folder: EGUG Holistic Testing
- Holistic Testing PreSurvey
- HolisticTestingEGUG
- ArcGIS for Electric and Gas Lab
- HolisticTestingEGUG
- EGUG 2015 Holistic Testing
--------------------------------------------
In folder: Gathering Reports
- 11-2015: Gas Gathering Report Layers
- Gas Gathering Report
- 02-2016: Gas Gathering Facility Report_CP
- 11-2015: Gas Gathering Report Layers
- 02-2016: Gas Gathering Report Layers_CP
- 02-2016: Gas Gathering Report Layers_CP
- Gas Gathering Report
- 02-2016: Gas Gathering Facility Report_CP
--------------------------------------------
In folder: Leak Logger
- LeakLoggerResults_CP
- LeakLoggerResults_CP
--------------------------------------------
In folder: Leak Survey Version Next
- LeakSurveyCollectorVNext
- Leak Survey Version Next
- LeakSurveyCollectorVNext
--------------------------------------------
In folder: NighttimeFlow
- DMAs
--------------------------------------------
In folder: Outage Details
- OutageDetails_1041
- OutageDetails_1041
--------------------------------------------
In folder: Point of Sales
- Point of Sale
--------------------------------------------
In folder: Pole Reports
- December-03-2015 Pole Report
- December-03-2015 Pole Report
- February-16-2016 Pole Report_CP
- February-16-2016 Pole Report_CP
- February-16-2016 Pole Report_CP
- December-03-2015 Pole Report
--------------------------------------------
In folder: Service Feasibility
- Service Feasibility WAB
--------------------------------------------
In folder: Survey-MS4 Outfall Inspection
- MS4 Outfall Inspection
- MS4 Outfall Inspection
- MS4 Outfall Inspection
--------------------------------------------
In folder: Transmission Reports
- 02-2016: Gas Transmission Facility Report_CP
- 02-2016: Gas Transmission Facility Layers_CP
- 02-2016: Gas Transmission Facility Layers_CP
- 02-2016: Gas Transmission Facility Map_CP
--------------------------------------------
In folder: Water Holistic Testing
- HolisticTestingWUG
- HolisticTestingWUG
- Water Holistic Testing
- Water Usability Lab
--------------------------------------------
In folder: Widget Testing
appProxies - attribute not implemented in UserItem class.
- PotentialBusinesses_WidgetTesting
- BusinessLocations_WidgetTesting
- OutageDetails_WidgetTest
- OutageDetails_WidgetTest
- Network Trace
- PotentialBusinesses_WidgetTesting
- BusinessLocations_WidgetTesting
- ServiceQualificationResults
- Web AppBuilder
- ServiceQualificationResults
- Illicit Trace
- Service Qualification WAB
Looking at user: ctran_arcgissolutions
--------------------------------------------
In folder: root
- Preincident map
- Web AppBuilder
--------------------------------------------
In folder: Pre-Filter Sample Data
- FDPreIncidentPlanning
- FDPreIncidentPlanning
Looking at user: feducdemo
--------------------------------------------
In folder: root
- Guam Islands2
- Guam Islands2
- Guam Islands
Looking at user: HowardSolutions
--------------------------------------------
In folder: root
- Howards test
- Hopslam 2016 Watch
- Howards test
- Howards test
- Hopslam 2016 Watch
Looking at user: jhauck_arcgissolutions
--------------------------------------------
In folder: root
- Test Map-Copy(last one failed)
- TestApp
- Test Map
Looking at user: JoeSolutions
--------------------------------------------
In folder: root
- ConsumptionAndTime
- Consumption In Time App
- Decreasing Neighborhood Usage Map Journal
- Map Journal High Use Neighborhoods
- Water Conservation With ArcGIS
- Map Journal High Use Customers
- Water Conservation Reporting
- Green Rebates
- Water Conservation Dashboard
Looking at user: JohnSolutions
--------------------------------------------
In folder: root
Looking at user: mark.scott.soldev
--------------------------------------------
In folder: root
Looking at user: MikeSolutions
--------------------------------------------
In folder: root
- Irrigation
- Irrigation
- CarFS
- TestAdopt
- watervector
- SmartTestSimple
- Workers
- testtest
- CarFS
- DC Water Hydrants Map-Copy
- WorkersFCSmart
--------------------------------------------
In folder: Citizen Response
- workers_674fc682b614414a88a7da25421869ae
- CitizenResponse_dispatchers
- dispatchers_674fc682b614414a88a7da25421869ae
- Smart Editing - FC
- Citizen Response
- location_674fc682b614414a88a7da25421869ae
- assignments_674fc682b614414a88a7da25421869ae
- CitizenResponse_workers
--------------------------------------------
In folder: Consumption
- Current High Water Consumption Accounts
--------------------------------------------
In folder: Cost
- Water Design
- WaterDesign
- WaterDesign
--------------------------------------------
In folder: DemoScripts
- dispatchers_8cb085a682734bdd85971cb5666b63a7
- DemoScripts
- workers_8cb085a682734bdd85971cb5666b63a7
- location_8cb085a682734bdd85971cb5666b63a7
- DemoScripts_workers
- assignments_8cb085a682734bdd85971cb5666b63a7
- DemoScripts_dispatchers
--------------------------------------------
In folder: Photo Survey
- JointUseSurvey
- werwerwerwear
- Joint Use Photo Survey Dash
- Joint Use Photo Survey Dash
- werwerwerwear
- JointUseSurvey
- Photo Survey Testing-Copy
- werwerwerwear
- Pole Photo Survey
--------------------------------------------
In folder: SmartEditorTest
- FiberNetwork
- SmartTestDemo
- Smart Editor
- NetworkServer
- ProjectPlanningMarkupServer
- SmartTest2
- SmartTestPortal
- FiberNetwork
- SmartTest
- ProjectPlanningMarkup
- FiberNetworkVectorTiles
- Smart Editor with Vector Tiles as basemap
- SmartTestPortalHosted
- ProjectPlanningMarkupServer
- Map Notestest
- SmartTest
- SmartTest2
- ProjectPlanningMarkup
- SmartTest2
- Map Notestest
- Smart Editor with Vector Tiles
- SmartTestDemo
- FiberNetworkVectorTiles
- SmartTest
- Smart Editor with Map Notes
- NetworkServer
- SmartTestDemo
- FiberNetwork
--------------------------------------------
In folder: Solutions
- My New Service
- SolutionsDemoArcRest
- SolutionBackup
--------------------------------------------
In folder: WAB
- WAB Dev
- WAB Surface
- WebBuilderUtilSolution
Looking at user: MyFakeUser
--------------------------------------------
In folder: root
Looking at user: PatSolutions
--------------------------------------------
In folder: root
- PublicOutagestest
- RiversideTransmission
- Download Summary Map for Model Orgs
- ServiceTerritory
- WaterDistributionNetwork104
- SBCC
- PublicOutagesv2
- WaterDistributionNetwork102
- FacilityMapII
- MappingChangeRequests
- Pole_Inventoryv1_WFL
- WebAppBuilder for ArcGIS
- WaterDistributionNetwork103
- MembershipDensity
- Pole_Inventory_v3
- Esri_Maps_for_SharePoint
- Main Line Switching Diagram
- Esri_Maps_for_SharePoint_WFL
- Download Summary Map for Model Orgs
- WaterDistributionNetwork103
- test
- FacilityMap102a
- FacilityMapII
- PublicOutagesT2
- MainLineSwitchingDiagram
- RiversideTransmissionMap
- FacilityMap102a
- MainLineSwitchingDiagramGrayScale
- WaterDistributionNetwork103
- FacilityMapv1031
- FacilityMap
- DownloadReportMap
- Pole_Inventoryv1_WFL
- FacilityMap
- Pole_InventoryTest1_WFL
- TransformerMap
- test
- PublicOutagesv2
- ServiceTerritory
- Esri_Maps_for_SharePoint_WTL1
- WaterDistributionNetwork102
- Main Line Switching Diagram
- FacilityMap3
- GasFacilityNetwork
- PublicOutagest1
- Electric Distribution Map
- GasFacilityNetwork
- LeakSurveyCollectorMap102
- Public Outages
- Esri_Maps_for_SharePoint_WTL1
- FacilityMap
- FacilityMapv2
- Travel from CatholicChurches (5 10 15 Minutes)
- Pole_InventoryTest1
- FacilityMapv2
- LeakSurveyCollectorMap102
- FacilityMapv2
- LeakSurveyCollectorMap104
- TraceResults
- Electric Maps
- MappingChangeRequests
- DownloadReportMap
- TraceResults
- FacilityMap3
- ServiceTerritory
- FacilityMapv1031
- WaterDistributionNetwork104
- Pole_InventoryTest1_WFL
- Esri Maps for SharePoint
- Water102
- Pole_Inventoryv1
- RiversideTransmissionMap
- Pole Reports - Solution Overview
- LeakSurveyCollectorMap103
- Utility Summary Map for Solutions - Online Downloads
- PublicOutagestest
- Tracking
- TransformerMap
- LeakSurveyCollectorMap103
- Download Summary Map for ArcGIS for Utilities and Telecommunications
- FacilityMapII
- Esri_Maps_for_SharePoint_WFL
- LeakCollector102
- MainLineSwitchingDiagramGrayScale
- GasFacilityNetwork
- WaterDistributionNetwork104
- PublicOutagest1
- FacilityMap102a
- Pole_Inventory_v3
- PublicOutagesT2
- MembershipDensity
- Service Area Map
- WaterDistributionNetwork102
- MembershipArea
- FacilityMap3
- Public Outages Viewer
- MainLineSwitchingDiagram
- LeakSurveyCollectorMap104
- FacilityMapv1031
- RiversideTransmission
--------------------------------------------
In folder: A4G
- MapChangeRequest
- MapChangeRequest
- Gas Facility Map
--------------------------------------------
In folder: CA - My Reports - All In One Reports
- All-in-One PDF Report
--------------------------------------------
In folder: Development
- DemandToHospitalsToLocations
- Location To Facility Analysis
- Unlimited
- Location_Facility_Analysis
- Assigned facilities for Hospitals
- Location_Facility_Analysis
- Assigned facilities for Locations
- Assigned facilities for Location_Facility_Analysis - Locations
--------------------------------------------
In folder: EGUG
- MapChangeRequestUpdates
- MapChangeRequestUpdates
- Map Change Requests
--------------------------------------------
In folder: Electric Maps
- CircuitMapv2
- ServiceAreav2
- Circuit_MapGrayScale
- Circuit Map
- CircuitMap
- CircuitMap
- CircuitMapv2
- ServiceAreav2
- Service Area Map
- Circuit Map
- Circuit_MapGrayScale
- Public Outage Map
--------------------------------------------
In folder: Gas Facility Maps
- Gas Service Area Map
- Gas Network Map
- Cathodic_Protection
- Isolation_Area_Map
- Gas_Pressure
- Isolation_Areas
- Gas_Leaks
- Gas Leak Map
- Gas_Leaks
- Cathodic_Protection
- Gas_Pressure
- Service_Area
- Gas Pressure Map
- Gas_Network
- Isolation_Areas
- Gas_Network
- Cathodic_Protection Map
- Gas_Network
- Service_Area
--------------------------------------------
In folder: Gas Marketing
- Gas Marketing Sales Campaign Dashboard
- Gas Door to Door Campaign
- Gas Service Lookup Summary
- Publish_Potential_Customers_List
- Gas Marketing Sales Campaign Summary
- Publish_Potential_Customers_List
--------------------------------------------
In folder: JointUseSurvey
- JointUseSurvey2
- Joint Use Survey
- JointUseSurvey2
--------------------------------------------
In folder: Outage Scaling Project
- TestingDataSet
- Houston Test Area
- TestingDataSet
--------------------------------------------
In folder: Pole Inventory
- PoleInventory
- PoleInventory_2015
- PoleInventory
--------------------------------------------
In folder: Public Outage Map
- PublicOutages102v2
- Public Outage Map v2-Copy
- PublicOutages102v2
- Public Outage Map v2-Copy
- Public Outage Map v2
--------------------------------------------
In folder: Riverside
- City of Riverside Circuit Map
- CircuitMapRiverside
- CircuitGrayScaleMapRiverside
- CircuitMap_Riverside
- City of Riverside Circuit Map
- CircuitMapRiverside
- Circuit_MapGrayScaleRiverside
- CircuitGrayScaleMapRiverside
- Circuit Map Riverside
- Circuit_MapGrayScaleRiverside
- Circuit Map Riverside
- City of Riverside Circuit Map - SoCal
- RiversideOutageReportingLayers
- CircuitMap_Riverside
- RiversideOutageReportingLayers
--------------------------------------------
In folder: Transmission Reports
- 02-2016: Gas Transmission Facility Layers_PD
- 02-2016: Gas Transmission Facility Map_PD
- 02-2016: Gas Transmission Facility Layers_PD
- 02-2016: Gas Transmission Facility Report_PD
Looking at user: PaulSolutions
--------------------------------------------
In folder: root
In [ ]:
Content source: Esri/ArcREST
Similar notebooks: