Select to view content in your preferred language

Retrieve ArcGIS Pro license activity through REST API for python

292
1
01-25-2024 06:56 AM
Labels (1)
Jelle_Stu_PR
Occasional Contributor II

In Portal you can see the ArcGIS Pro license activity through this button:

Jelle_Stu_PR_1-1706193749767.png

My simple question is, can you obtain this ArcGIS Pro activity through the REST API for python? 

With the following code you can get what licenses are assigned to what user and when they had their last login: 

 

 

gis.admin.license.get('ArcGIS Pro')
print(agpro.all())

 

 

returns

 

 

[{'username': 'name 1', 'lastLogin': 1706174509800, 'disconnected': False, 'entitlements': ['arcgispro-extension1', 'arcgispro-extension2', 'arcgispro-extension3']},{other users with arcgis pro extension licenses},{'username': 'username1', 'lastLogin': 1706098700941, 'disconnected': False, 'entitlements': ['desktopAdvN']}]

 

 

 

What does the last login mean in this case? Last time they logged into Portal or the last time they used ArcGIS Pro?
Furthermore, the issue with this is that it only returns the users that have additional ArcGIS Pro extension licenses or the single user that has an ArcGIS Pro Advanced license through Portal. All the named used licenses that are given through the user types "GIS Professional Basic/Standard/Advanced' are not returned.
 
Does anybody know a way how to natively retrieve the ArcGIS Pro license activity of all named users using the REST API for Python?
 
best,
Jelle Stuurman 
0 Kudos
1 Reply
JoshuaClanton
New Contributor III

I'm also looking for a very similar script. Sadly, Esri does not provide any documentation on it currently..

0 Kudos