Esri / ago-tools

A Python package to assist with administering ArcGIS Online Organizations.
Apache License 2.0
87 stars 88 forks source link

Open Data site doesn't see data after script ran #56

Open dklassenatkamloops opened 6 years ago

dklassenatkamloops commented 6 years ago

I ran this script against a feature layer in our AGOL account that is being fed into our Open Data site. Once I ran the script, the layer completly disappeared from our open data site. I don't know why this is. Any thoughts/ideas?

jgravois commented 6 years ago

is the item still shared with whichever group you are using to aggregate your Open Data?

dklassenatkamloops commented 6 years ago

Yes, the sharing hasn't change at all. Not sure why it doesn't show up still.

school catchment

jgravois commented 6 years ago

i have no idea.

my best suggestion is to use @ecaldwell's other deprecated OSS project ago-assistant to compare and contrast the raw JSON of the problematic item and one that is behaving appropriately to see if anything sticks out at you.

summoning @sidewalkballet @akharris as well in case they have any other ideas.

dklassenatkamloops commented 6 years ago

Thanks for the suggestion. Looked at the raw JSON and compared to another one, nothing that I can see other than the URL is different.

ecaldwell commented 6 years ago

Can you detail which script you were using?

My understanding is that there are some additional hooks in Open Data that bind things behind the scenes. You may try unsharing and resharing that layer with Open Data to see if that causes it to get picked up again.

Aside from that, this library uses documented REST API calls to work with your content...i.e. it should not easily cause breaking changes in your content. I'd open a support ticket with Esri to see if they can help get to the bottom of it.

dklassenatkamloops commented 6 years ago

Yes. I was using this script: []https://github.com/Esri/ago-tools/blob/master/samples/updateMapServiceUrlsInWebMaps.py

We are planning on opening a ticket with ESRI if we cannot resolve this issue ourselves in the next day or so. I don't really want to manually change the sharing on the Feature Layer, as this is just a test, we have about 120 more layers we want to change the URL for. Hence why we are looking for a scripting solution.

ecaldwell commented 6 years ago

I still think opening a ticket is the best approach to get this resolved, but wanted to note that you could also incorporate the unsharing/resharing workflow into the script if needed. https://developers.arcgis.com/rest/users-groups-and-items/share-item-as-item-owner-.htm

jgravois commented 6 years ago

I don't really want to manually change the sharing on the Feature Layer

please give @ecaldwell's suggestion a try. you can worry about what you want to do in production if it actually resolves the problem.

hopefully Esri Support will have other troubleshooting suggestions, but they likely won't be able to provide assistance with the scripts in this unmaintained repo on GitHub.

courtneycl commented 6 years ago

Hi @dklassenatkamloops - looks like you've found a bug! I was able to reproduce by swapping the map service manually. This has nothing to do with the script. I've logged it in our system, but feel free to contact support as well and we'll sync our tickets so you receive updates through support.

dklassenatkamloops commented 6 years ago

Thanks @sidewalkballet We have a related ticket that we are going to append this to. I have mentioned this tread and your experience, so we will see what we get. Thanks all for the suggestions.