ArcGIS Pro 2.3 Sharing Module Error

1414
10
Jump to solution
02-15-2019 01:16 PM
DavidColey
Frequent Contributor

Hello -  it appears that the Upload Service Definition tool is not honoring the '"groups" setting now at 2.3.  This worked at 2.2.x:

arcpy.UploadServiceDefinition_server('C:/ArcProProjects/PortalUpdates/Environmental/' + lyr.name + '.sd', 'My Hosted Services', "","","","","","OVERRIDE_DEFINITION","SHARE_ONLINE","PUBLIC",
 "SHARE_ORGANIZATION","Environmental Layers Group")

I can get around it by using the api:

portItem.share(everyone=True,org=True,groups="21afe6b205cf4ff99271b4fe25f3b2d7")

 

Thanks,

David

1 Solution

Accepted Solutions
SusanTran
Esri Contributor

Thank you for reporting this issue. I'm able to reproduce the problem and have logged a bug internally also. 

View solution in original post

10 Replies
PhilLarkin1
Occasional Contributor III

I've had an unbelievably difficult time getting stable results from either arcpy or arcgis api for updating AGOL Items. It seems that every update breaks one or the other. It is surprising there isn't more activity on Geonet over this problem.

I've submitted two premium support cases for issues with UploadServiceDefinition_server. The most recent being the issue you describe with the in_groups property. Not a single bug has been filed, only enhancements related to documentation. It seems the Tier 1 staff is being incentivized to not pass actual development issues to the development staff. 

Anyways, thanks for posting your workaround. This is more than I have gotten out of ESRI premium support. 

DavidColey
Frequent Contributor

Sure.  Other quirky things I run into: When using the .share method in the Item module of the api, I've never been able to get the "groups" argument/parameter to honor the group name, only the group ID.  Maybe because group names are an array and group ID's aren't.  Not sure.

In the sharing module of arcpy, I've never been able to add a comma separated list of tags if a tag is more than one word with spaces in it.  Like 'Tree Inventory' has to read as 'TreeInventory' and so on.  

0 Kudos
PhilLarkin1
Occasional Contributor III

A bug was posted. It isn't showing up in the support search yet.

BUG-000120282; The in_groups parameter in UploadServiceDefinition_server does not update group sharing in the published feature service as expected

PhilLarkin1
Occasional Contributor III

Bug status has been updated to 'Implemented' at 2.4

ThomasColson
MVP Frequent Contributor

Surprised this won't make it into 2.3.2.......

DavidColey
Frequent Contributor

Yeah I'm guessing this is a larger issue that req's a larger fix .  .  .

0 Kudos
PhilLarkin1
Occasional Contributor III

I am only able to update one group ID at a time. Sending a comma separated list, as instructed in the 1.5.1 api documentation, will return an exception. 

0 Kudos
SusanTran
Esri Contributor

Thank you for reporting this issue. I'm able to reproduce the problem and have logged a bug internally also. 

DavidColey
Frequent Contributor

Thanks Susan for looking into it.

0 Kudos